hi
Total Pageviews
Tuesday, October 1, 2019
Program to find reverse of input string using 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"The reversed word=";C$
END SUB
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment