Count total no. of vowels in a given word

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

SUB COUNT(A$)
C = 0
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 C =C+1
NEXT I
PRINT"TOTAL NO. OF VOWELS IN A GIVEN WORD="; C
END SUB

Comments

Popular posts from this blog

My experience in jagat mandir school

PERFECT SQR OR NOT

Picnic experience