In Chapter 6, you read about a technique called nesting, where you were able to put conditions within conditions as a substitute for using multiple conditions, logically combined together. Loops can also be nested, but you don’t nest to avoid nested conditions. You nest loops because you need to do additional repetitive work within an outer loop.
So you have a nest of loops where the outermost loop will be executed first (one iteration), and then the inside loop will be executed until it reaches a conclusion. Control is then returned to the outer loop. In this way, the inner loop is executed n times for every pass of the outer loop.
Figure 7.1 depicts loop nesting in a diagram format.
If you execute ...