Wednesday, October 2, 2019

Erase vowel from input string using function

DECLARE FUNCTION DISPC$ (S$)
CLS
INPUT "ENTER ANY STRING"; S$
PRINT " AFTER EARISNG VOWELS = "; DISPC$(S$)
END

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

No comments:

Post a Comment

Experience of covid-19 and cancelling SEE exam

A dangers virus called corona also know as COVID-19 took place around the world. This virus was first found in Wuhan china.this virus start...