QBASIC PROGRAM TO FIND REVERSE OF THE STRING .SUB
DECLARE SUB REV(N$)
CLS
INPUT "ENTER A WORD ";N$
DECLARE SUB REV(N$)
CLS
INPUT "ENTER A WORD ";N$
CALL REV (N$)
END
SUB REV(N$)
FOR I = LEN(N$) TO 1 STEP -1
C$=C$+ MID$(N$,I,1)
NEXT I
PRINT "REVERSE STRING";C$
END SUB
No comments:
Post a Comment