Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+9 votes

Project 1 Checkpoint B.

I have a loop inside of a loop statement and cannot get my final year totals to add up properly. Is there a good place to put a summation equation that will make my program add right?

asked in old_CSC201 by (8 points)

1 Answer

+2 votes

Since you are summing the final year's population, which is computed in the inner loop, then the summation equation that you need to compute the average should be after the inner loop, but within the outer loop (since you want to include the population of each country).

answered by (8 points)