Erase vowel from input string
DECLARE FUNCTION ERASE (N$)
CLS
INPUT"ENTER ANY STRING";N$
PRINT"STRING WITHOUT VOWELS=";ERASE(N$)
END
FUNCTION ERASE (N$)
FOR I = 1 TO LEN (N$)
A$= MID$(N$,I,1)
B$=UCASE$(A$)
IF B$<>"A" AND B$<>"E" AND B$<>"I" AND B$<>"O" AND B$<>"U" THEN C$=C$+B$
NEXT I
ERASE=D$
END FUNCTION
CLS
INPUT"ENTER ANY STRING";N$
PRINT"STRING WITHOUT VOWELS=";ERASE(N$)
END
FUNCTION ERASE (N$)
FOR I = 1 TO LEN (N$)
A$= MID$(N$,I,1)
B$=UCASE$(A$)
IF B$<>"A" AND B$<>"E" AND B$<>"I" AND B$<>"O" AND B$<>"U" THEN C$=C$+B$
NEXT I
ERASE=D$
END FUNCTION
Comments
Post a Comment