WRITE A QBASIC PROGRAM TO PRINT ONLY VOWELS FROM A WORD(SUB)

QBASIC PROGRAM TO PRINT ONLY VOWELS FROM A WORD


QBASIC PROGRAM TO PRINT ONLY VOWELS FROM A WORD(SUB)


Solution: 

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

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