1. WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
N
NE
NEP
NEPA
NEPAL
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END SUB
2.WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
L
AL
PAL
EPAL
NEPAL
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT RIGHT$(S$, I)
NEXT I
END SUB
3.WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
NEPAL
EPAL
PAL
AL
L
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP - 1
PRINT RIGHT$(S$, I)
NEXT I
END SUB
4.
WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
NEPAL
NEPA
NEP
NE
N
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP - 1
PRINT LEFT$(S$, I)
NEXT I
END SUB
5.WRITE A PROGRAM TO PRINT THE
FOLLOWING PATTERN
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
6.
WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
L
A
P
E
N
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP -1
PRINT MID$(S$, I, 1)
NEXT I
END SUB
7.
WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
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 TAB(I); MID$(S$, I, 1)
NEXT I
END SUB
8.
WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
L
A
P
E
N
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
B = 1
FOR I = LEN(S$) TO 1 STEP -1
PRINT TAB(B); MID$(S$, I, 1)
B = B + 1
NEXT I
END SUB
9. WRITE A PROGRAM TO PRINT THE
FOLLOWING PATTERN
NEPAL
EPA
P
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 1
FOR I = LEN(S$) TO 1 STEP -2
PRINT MID$(S$, A, I)
A = A + 1
NEXT I
END SUB
10. WRITE A PROGRAM TO PRINT THE
FOLLOWING PATTERN
P
EPA
NEPAL
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 3
FOR I = 1 TO LEN(S$) STEP 2
PRINT MID$(S$, A, I)
A = A - 1
NEXT I
END SUB
11.
WRITE A PROGRAM TO PRINT THE FOLLOWING PATTERN
NEPAL
EPA
P
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 1
FOR I = LEN(S$) TO 1 STEP -2
PRINT TAB(A); MID$(S$, A, I)
A = A + 1
NEXT I
END SUB
12. WRITE A PROGRAM TO PRINT THE
FOLLOWING PATTERN
P
EPA
NEPAL
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 3
FOR I = 1 TO LEN(S$) STEP 2
PRINT TAB(A); MID$(S$, A, I)
A = A - 1
NEXT I
END SUB