Wednesday, October 2, 2019

7) Display reverse of input string(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)
D$=D$+B$
NEXT I
REV$=D$

END FUNCTION

No comments:

Post a Comment

My Journey with JM

MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...