Thursday, October 3, 2019

32) ERASE VOWEL FROM INPUT STRING ( FUNCTION)

DECLARE FUNCTION ERASE(A$)
CLS
INPUT " ENTER ANY STRING";A$
PRINT " STRING WITHOUT VOWELS ARE"; ERASE(A$)
END

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

No comments:

Post a Comment

My Journey with JM

MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...