7) DISPLAY Reverse of input strings.(sub)
DECLARE SUB REV$ (N$)
CLS
INPUT "ENTER A STRING "; N$
CALL REV$(N$)
END
SUB REV$ (N$)
FOR I = LEN(N$) TO 1 STEP -1
B$ = MID$( N$,I,1)
NEXT I
PRINT"Reverse strings";C$
END SUB
DECLARE SUB REV$ (N$)
CLS
INPUT "ENTER A STRING "; N$
CALL REV$(N$)
END
SUB REV$ (N$)
FOR I = LEN(N$) TO 1 STEP -1
B$ = MID$( N$,I,1)
NEXT I
PRINT"Reverse strings";C$
END SUB
0 comments