0
Kindly explain nested for loop to create row and columns(row is 3 and column is 5). In C++.
1 2 3 4 5 1 3 5 7 9 1 4 7 10 13 Display it as output using for loop.
1 Answer
+ 6
# Python solution below
for j in range(3):
for i in range(5):
print(i*(j+1)+1,'\t\t', end='')
print()
# Nested 'for i' loop iterates five times and is itself iterated three times. Each time of all the fifteen routines the calculation is done and printed.