Computer Science, asked by Lordwinsam914, 5 months ago

Write programs using nested loops to produce the following patterns :

2

4 4

6 6 6

8 8 8 8​

Answers

Answered by BrainlyProgrammer
2

Answer:

This is done in QBASIC

CLS

FOR I=1 TO 4

FOR J=1 TO I

PRINT I*2

NEXT J

PRINT

NEXT I

END

Answered by anindyaadhikari13
3

Question:-

Write a program using nested loop to print the following pattern.

2

4 4

6 6 6

8 8 8 8

Program:-

This is written in Python.

for i in range(1,5):

for j in range(1,i+1):

print(i*2, end=" ")

print()

Using QBASIC,

CLS

FOR I=1 TO 4 STEP 1

FOR J=1 TO I STEP 1

PRINT I*2+" "

NEXT J

PRINT

NEXT I

END

Similar questions