Thursday, October 17, 2019

139. Qbasic program to display: N E P A L


139.      Write a program using SUB……….END SUB to display:
N
E
P
A
L

DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END

SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT MID$(S$, I, 1)
NEXT I
END SUB

No comments:

Post a Comment