1) | 12345678910111213PROGRAMMING
PROGRAMMIN
PROGRAMMI
PROGRAMM
PROGRAM
PROGRA
PROGR
PROG
PRO
PR
P
|
123456CLS
a$ = "PROGRAMMING"
FOR i = LEN(a$) TO 1 STEP -1
PRINT LEFT$(a$, i)
NEXT i
END
|
2) | 123456785
55
555
5555
55555
|
1234567CLS
n = 5
FOR i = 1 TO 5
PRINT n
n = n * 10 + 5
NEXT i
END
|
3) | 12345678 P
EPA
NEPAL
|
12345678910CLS
S$ = "NEPAL"
r = 1
t = 10
FOR i = 3 TO 1 STEP -1
PRINT TAB(t); MID$(S$, i, r)
r = r + 2
t = t - 1
NEXT i
END
|
4) |
1234567891011123456787654321
1234567654321
12345654321
123454321
1234321
12321
121
1
| 123456789CLS
n# = 11111111
s = 10
FOR i = 1 TO 8
PRINT SPACE$(s); n# * n#
n# = n# \ 10
s = s + 1
NEXT i
END
|
5) | 1234567891
2 3
4 5 6
7 8 9 10
11 12 13 14 15
|
1234567891011CLS
c = 1
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT c;
c = c + 1
NEXT j
PRINT
NEXT i
END
|
5) | 12345671 3 5 7 9
1 3 5 7
1 3 5
1 3
1
|
123456789CLS
FOR i = 9 TO 1 STEP -2
FOR j = 1 TO i STEP 2
PRINT j;
NEXT j
PRINT
NEXT i
END
|
5) | 1234569
9 7
9 7 5
9 7 5 3
9 7 5 3 1
|
123456789CLS
FOR i = 9 TO 1 STEP -2
FOR j = 9 TO i STEP -2
PRINT j;
NEXT j
PRINT
NEXT i
END
|
5) | 1234561
1 3
1 3 5
1 3 5 7
1 3 5 7 9
|
123456789CLS
FOR i = 1 TO 9 STEP 2
FOR j = 1 TO i STEP 2
PRINT j;
NEXT j
PRINT
NEXT i
ENDa
|
Patterns in QBASIC SET-1
Visit My YouTube Channel : https://www.youtube.comtechnicalschoolnepal
Facebook page : www.facebook.com/technicalschoolnepal
Complete QBASIC Course
Go to Practice Time
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.