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 1STEP -1
B$=MID$(N$,I,1)
C$=C$+B$
NEXT I
PRINT"REVERSED WORD I";C$
ENDSUB

Comments

Popular posts from this blog

experience of SEE exam cancelled and covid-19

My journey in jagat mandir