23) PRINT ONLY VOWELS FROM A 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
0 comments