Wednesday, October 2, 2019

23) PRINT ONLY VOWELS FROM GIVEN WORD (SUB)

DECLARE SUB DISP (A$)
CLS
INPUT " ENTER A WORD ";A$
CALL DISP (A$)
END

SUB DISP (A$)
FOR I = 1 TO LEN(A$)
B$ = MID (A$ , I, 1)
C$ = UCASE$(B$)
IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN V$=V$ + C$
NEXT I
PRINT V$
END SUB

No comments:

Post a Comment

My Journey with JM

MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...