Input string and count total no of constant (function)


DECLARE FUNCTION CONSO(N$)
CLS
INPUT"ENTER ANY WORD";N$
PRINT"TOTAL NO OF CONSONANT";CONSO(N$)
END

FUNCTION CONSO(N$)
C=0
FOR I=1 TO LEN(N$)
B$=MID$(N$,I,1)
C$=UCASE$(B$)
IF C$<>"A"ANDC$<>"E"ANDC$<>"I"ANDC$<>"C$<>"O"AND C$<>"U" THEN C=C+1
NEXT I
CONSO=C
END FUNCTION

Comments

Popular posts from this blog

experience of SEE exam cancelled and covid-19