Spaces:
Running
Running
Create 14b. How many loops
Browse files
Week 1: Types, condition clauses and loops/14b. How many loops
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Combine the for loops and the number of loops completed in them.
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
for (int y = 10; y >=9; y--)
|
| 5 |
+
2
|
| 6 |
+
|
| 7 |
+
for (int z = 5; z < 8; z++)
|
| 8 |
+
3
|
| 9 |
+
|
| 10 |
+
for (int i=0; i<4; i++)
|
| 11 |
+
4
|
| 12 |
+
|
| 13 |
+
for (int xx = 10; xx > 5; xx--)
|
| 14 |
+
5
|
| 15 |
+
|
| 16 |
+
for (int j = 1; j < 8; j++)
|
| 17 |
+
7
|
| 18 |
+
|