Thursday, October 17, 2019

140. Qbasic program to display the following pattern: - H KHA OKHAR POKHARA


140.      Write a program to display the following pattern: -
H
KHA
OKHAR
POKHARA

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

SUB PATTERN (S$)
A = 4
FOR I = 1 TO LEN(S$) STEP 2
PRINT TAB(A); MID$(S$, A, I)
A = A - 1
NEXT I
END SUB

No comments:

Post a Comment