#  Print total no of vowels in a given word. (sub)

DECLARE SUB COUNT(n$)
CLS
INPUT " Enter any word ";n$
CALL COUNT(n$)
END

SUB COUNT(n$)
C=0
FOR I =1 TO LEN(n$,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 =";C
END



Comments

Popular posts from this blog