CS 150 Introduction to C++ Programming - Spring 1998 |
|---|
[ Home | Lecture Notes| WebTutor | WebTutor Site Map]
Since a loop can have
any C++ statement in its body, it can have another loop inside.
Putting one loop inside another loop is sometimes called
"nesting" loops.
Nested loops occur naturally in solving many problems and are
quite common in C++ programs.
Figuring them out requires clear thinking and careful analysis.