# Display reverse of input string. (sub)


DECLARE SUB REV (N$)
CLS
INPUT "Enter any word";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 "Reversed word ";C$
END SUB


Comments

Popular posts from this blog