# Input string and count total no of consonant. (function)

DECLARE FUNCTION COUNT(n$)
CLS
INPUT"Enter any number";n$
PRINT"total no of consonant =";COUNT(n$)
END

FUNCTION COUNT(n$)
C=0
FOR I=1TO LEN(n$)
B$=MID$(n$,I, 1)
C$=UCASE$(B$)
IF c$="a"AND c$="e" AND c$="i" AND c$="o" AND c$="u" THEN
C=C+1
NEXT I
COUNT=C
END FUNCTION

Comments

Popular posts from this blog