QBASIC PROGRAM TO DISPLAY REVERSE OF INPUT STRING (SUB)


DECLARE SUB REV$(S$)
CLS 
INPUT "ENTER A STRING ";S$
CALL REV(S$)
END

SUB REV$(S$)
FOR I=LEN(N$) TO 1 STEP -1
B$=MID$(N$,I,1)
C$=C$+B$
NEXT I
REV$=C$
END SUB

Comments

  1. Well explained string operation .
    there are good String program collection visit Top String program

    ReplyDelete

Post a Comment

Popular Posts