Connect Me

twitterfacebookgoogle plus email

  Instagram View Biwas Bhattarai's profile on LinkedIn

WAP using SUB procedure to enter a string and print the characters of even position only. (Example: KATHMANDU, output is AHAD)

WAP using SUB procedure to enter a string and print the characters of even position only. (Example: KATHMANDU, output is AHAD)

DECLARE SUB EVEN(E$)
CLS
INPUT "INPUT A WORD/STRING";E$
CALL EVEN(E$)
END

SUB EVEN(E$)
FOR I=1 TO LEN(E$)
F$=MID$(E$,I,1)
IF I MOD 2=0 THEN PRINT F$;
NEXT I
END SUB
Ą
https://www.flickr.com/photos/spklg/15211044551/