Lessons
C++ · Bigger Programs · 23. Nested Loops
step 1 of 7
A loop in a loop
Put one loop inside another. The outer loop makes the rows. The inner loop fills one row with stars.
3 rows, 4 stars each: a little rectangle.
Mission
Make it 4 rows of 7 stars, then RUN.
PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
← press me!
Press RUN to see what this program does.