11.INPUT STRING AND COUNT TOTAL
NO. OF CONSONANT
DECLARE FUNCTION DISP$(N$)
CLS
INPUT “ENTER ANY WORD”;N$
PRINT “CONSONANT=”;DISP$(N$)
END
FUNCTION DISP(N$)
FOR I =1 TO 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 V$=V$+B$
NEXT I
DISP$=V$
END FUNCTION
No comments:
Post a Comment
beautiful