Computer Science, asked by anikmodakvis, 8 months ago

write a program in qbasic so as to print a triangular pattern (not a right angled triangle ) rows - 5
1
101
10101
1010101
101010101​

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
93

\mathtt{\bf{\huge{\underline{\red{Question\:?}}}}}

CLS

FOR i = 1 , 3 , 5, 7 , 9

FOR j = 1 TO 1

x = j MOD 2

FOR j = 1 TO 3

x = j MOD 2,

FOR j = 1 TO 1 to 5

x = j MOD 2

FOR j = 1 TO 1 to 7

x = j MOD 2

FOR j = 1 TO 1 to 9

x = j MOD 2

PRINT x;

NEXT j

PRINT

NEXT i

END

\mathtt{\bf{\huge{\underline{\green{Answer :- }}}}}

1

101

10101

1010101

101010101

_______________________________________


Bᴇʏᴏɴᴅᴇʀ: Perfect!
Anonymous: The Master Programmer's Awesome Answer !
Anonymous: You're most welcome.
Similar questions