back
Gettin' Loopy with Loops: Part 2

Nested Loops

A nested loop is a loop within a loop. Don't mess with these unless you've finished the prior assignment and understand the basic concept of a loop. The best way to get the idea of a nested loop is to see one in action. Examine this code. [nested loop example].Copy and paste it in your compiler. Run it. Save it under the name "nested_loop_1."

Can you see how complicated a nested loop could get if you didn't organize your curly braces?