7. DISPLAY REVERSE OF INPUT STRING
DECLARE SUB REV(N$)
CLS
INPUT “ENTERT NAME”;N$
CALL REV (N$)
END
SUB REV (N$)
FOR I = LEN (N$) TO 1 STEP – 1
B$=MID$(N$,I,1)
C$=C$+B$
NEXT I
PRINT “REVERSE STRING IS “;C$
END SUB
No comments:
Post a Comment
beautiful