go to previous page   go to home page   go to next page hear noise

Answer:

The program tries out various interest rates starting at zero percent. For each interest rate, the initial amount of dollars must be reset back to the amount in the account at the beginning of the first year.


Flowchart

Here is a flowchart that shows the logic of the program. Observe how one loop is nested inside of another. Notice how dollars is initialized to initialAmount each time the inner loop is started.

Study how rate is adjusted to a new rate at the top of the loop body of the outer loop.

nested loop

QUESTION 12:

Does rate keep increasing as the program runs?