Write programs using nested loops to produce the following patterns :
2
4 4
6 6 6
8 8 8 8
Answers
Answered by
2
Answer:
This is done in QBASIC
CLS
FOR I=1 TO 4
FOR J=1 TO I
PRINT I*2
NEXT J
NEXT I
END
Answered by
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
NEXT I
END
Similar questions
Math,
2 months ago
Math,
2 months ago
Political Science,
2 months ago
English,
5 months ago
Computer Science,
5 months ago
India Languages,
10 months ago