Next: Checkoff
Up: Nested DO Loops
Previous: Nested DO Loops

Another Example

Let's consider another, more direct example of a nested DO loop.

Suppose that you are to write a program to compute the average score for a set of students, each of whom has taken some number of examinations. Your program is to ask the user how many students there are and then, for each student,

How can we know that nested DO loops will be involved in this solution?

Click here for the answer

What is a structure plan for this program?

Click here for the answer

It is easy to see that this structure plan involves a nested loop.


Next: Checkoff
Up: Nested DO Loops
Previous: Nested DO Loops

Hamlet Project
hamlet@cs.utah.edu