previous
|
start
|
next
Self Check
How would you modify the nested loops so that you print a square instead of a triangle?
What is the value of n after the following nested loops?
int n = 0;
for (int i = 1; i <= 5; i++)
for (int j = 0; j < i; j++)
n = n + j;
previous
|
start
|
next