Count total no of vowel in a word(function)
CLS
INPUT"ENTER ANY WORDS";N$
PRINT"TOTAL NO OF VOWEL=";COUNT(N$)
END
FUNCTION COUNT(N$)
C=0
FOR I=1TO LEN(N$)
BS
$=MID$(N$,I,1)
C$=UCASE$(B$)
IFC$="A"ORC$="E"ORC$="O"ORC$="U"THEN C=C+1
NEXT I
COUNT=C
END FUNCTION
Comments
Post a Comment