Predict the output of the following nested loops:
int n, m;
for (n = 1; n <= 10; n++)
for (m = 10; m >= 1; m--)
cout << n << " times " << m
The output of the given code:
1 times 10 = 10
1 times 9 = 9
.
.
.
1 times 1 = 1
2 times 10 = 20
2 times 9 = 18
.
.
.
2 times 1 = 2
3 times 10 = 30
.