ERASE VOWELS FROM INPUT STRING(FUNCTION)
DECLARE FUNCTION DISP$(S$)
CLS
INPUT "ENTER ANY STRING";S$
PRINT "WORD AFTER ERASING VOWELS";DISP$(S$)
END
FUNCTION DISP$(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" THEN
D$=D$+B$
END IF
NEXT I
DISP$=D$
END FUNCTION
CLS
INPUT "ENTER ANY STRING";S$
PRINT "WORD AFTER ERASING VOWELS";DISP$(S$)
END
FUNCTION DISP$(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" THEN
D$=D$+B$
END IF
NEXT I
DISP$=D$
END FUNCTION
Comments
Post a Comment