N NE NEP NEPA NEPAL PATTERN
251. WAP to display
N
NE
NEP
NEPA
NEPAL
USING SUB PROCEDURE
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
252. WAP to display
L
AL
PAL
EPAL
NEPAL
USING SUB PROCEDURE
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
253. WAP to display
NEPAL
EPAL
PAL
AL
L
USING SUB PROCEDURE
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
253. WAP to display
NEPAL
NEPA
NEP
NE
N
USING SUB PROCEDURE
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
254. WAP to display
N
E
P
A
L
USING SUB PROCEDURE
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
255. WAP to display
L
A
P
E
N
USING SUB PROCEDURE
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
256. WAP to display
N
E
P
A
L
USING SUB PROCEDURE
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
257. WAP to display
L
A
P
E
N
USING SUB PROCEDURE
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
257. WAP to display
NEPAL
EPA
P
USING SUB PROCEDURE
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
258. WAP to display
P
EPA
NEPAL
USING SUB PROCEDURE
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
259. WAP to display
NEPAL
EPA
P
USING SUB PROCEDURE
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
260. WAP to display
P
EPA
NEPAL
USING SUB PROCEDURE
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
261. WAP to display
*
**
***
****
*****
******
*******
USING SUB PROCEDURE
DECLARE SUB PATTERN (S$)
CLS
S$ = "*******"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END SUB
262. WAP to display
*******
******
*****
****
***
**
*
USING SUB PROCEDURE
DECLARE SUB PATTERN (S$)
CLS
S$ = "*******"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP -1
PRINT LEFT$(S$, I)
NEXT I
END SUB
263. WAP to display
*
**
***
****
*
**
***
****
*
*
*
*
CLS
S$ = "****"
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
FOR J = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT J
FOR K = 1 TO LEN(S$)
PRINT MID$(S$, K, 1)
NEXT K
END
USING SUB PROCEDURE
DECLARE SUB PATTERN1 (S$)
DECLARE SUB PATTERN (S$)
CLS
S$ = "****"
CALL PATTERN(S$)
CALL PATTERN(S$)
CALL PATTERN1(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END SUB
SUB PATTERN1 (S$)
FOR K = 1 TO LEN(S$)
PRINT MID$(S$, K, 1)
NEXT K
END SUB
Comments
AC
ING
what will be the program code
a$="racing":a=1
for i=1 to len(a$)
? mid$(a$,a,i)
a=a+1
next
end
*
***
*****
*******
*********
PLS SEND FAST
N
NE
NEP
NEPA
NEPAL
but.....in function procedure plz teach me fast within tommsrow is my send up
$$$
$$$$$
$$$
$
Pls tell me how to solve
***
*****
*******
*********
cls
a$="*********"
a=1
b=1
for i=1 to 5
print mid$(a$,a,b)
b=b+2
next
end
LLLLL
AAAA
PPP
EE
N
N
E
P
A
L
K
KA
KAT
KATH
KATHM
KATHMA
KATHMAN
KATHMAND
KATHMANDU
E
P
A
L
E
P
A
L
1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
234
3
How to do in qbasic
Epa
P
1234
1234
1234
1) N
E
P
A
L
2) G
OGR
ROGRA
PROGRAM
N N
E E
P P
A A
L
A A
P P
E E
N N
NePaL
NePa
NeP
Ne
N
??Plz
*****
***
*
EPA
N