Monday, September 30, 2019

Count total no of vowel in a word(function)

DECLARE FUNCTION COUNT(N$)
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

No comments:

Post a Comment

Experience of covid-19 and cancelling SEE exam

A dangers virus called corona also know as COVID-19 took place around the world. This virus was first found in Wuhan china.this virus start...