Print total no. of vowels in given word
DECLARE SUB COUNT(N$)
CLS
INPUT"Enter any word";N$
CALL COUNT(N$)
END
SUB COUNT(N$)
FOR I = 1 TO LEN(N$)
B$ = MID$(N$,I,1)
C$ = UCASE$(B$)
IF C$ = ""OR C$="E" OR C$="I" OR C$="U" OR C$="O" THEN C=C+1
PRINT C$
NEXT I
END FUNCTION
CLS
INPUT"Enter any word";N$
CALL COUNT(N$)
END
SUB COUNT(N$)
FOR I = 1 TO LEN(N$)
B$ = MID$(N$,I,1)
C$ = UCASE$(B$)
IF C$ = ""OR C$="E" OR C$="I" OR C$="U" OR C$="O" THEN C=C+1
PRINT C$
NEXT I
END FUNCTION
Comments
Post a Comment