String programming with qbasic

Observe the following coding in qbasic and find the output if A$="RAM IS GOOD" ---

  A$=A$+" "
    L=LEN(A$)
    FOR I= 1 TO L
       B$=MID$(A$,I,1)
        IF B$<>" " THEN
        C$=B$+C$
        ELSE
        D$=D$+C$+" "
        C$=""
        END IF
      NEXT I
      PRINT "out put :-  ";D$

[ Hint:- log on to comprogzz.in then select "Programs on qbasic" option then select "String programs " option then find the program number 11 ]

×

Problem Loading...

Note Loading...

Set Loading...