Predict the output of the following nested loops:

```
int n = 1;
while(n <= 10)
{
int m = 10;
while(m>=1)
{
cout << n << “ times “ << m
<< “ = “ << n*m << endl;
m--;
}
n++;
```

1 times 10 = 101 times 9 = 9. . .
1 times 1 = 12 times 10 = 20. . .
2 times 1 = 23 times 10 = 30. . .
3 times 1 = 34 times 10 = 404 times 9 = 36. . .
4 times 2 = 84 times 1 = 4. . .
9 times 10 = 90
. . .
9 times 1 = 910 times 10 = 100. . .
10 times 1 = 10

Computer Science & Information Technology

You might also like to view...

Only visible worksheet tabs can be grouped

Indicate whether the statement is true or false.

Computer Science & Information Technology

SQL is banned from the NoSQL technology collection.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology