Print total no of vowel in a given word(sub)
DECLARE SUB DISP(N$)
CLS
INPUT"ENTER ANY WORD";N$
CALL DISP(N$)
END
SUB DISP(N$)
FOR I=1 TO LEN(N$)
B$=MID$(N$,I,1)
C$=UCASE(B$)
IFC$<>"A"ANDC$<>"E"ANDC$<>"I"ANDC$<>"O"AND C$<>"U"THEN U$=U+B$
NEXT IPRINT"VOWEL";V$
END SUB
CLS
INPUT"ENTER ANY WORD";N$
CALL DISP(N$)
END
SUB DISP(N$)
FOR I=1 TO LEN(N$)
B$=MID$(N$,I,1)
C$=UCASE(B$)
IFC$<>"A"ANDC$<>"E"ANDC$<>"I"ANDC$<>"O"AND C$<>"U"THEN U$=U+B$
NEXT IPRINT"VOWEL";V$
END SUB
Comments
Post a Comment