In this chapter, you will study the important case of using loops to process large sets of data. You will often use a loop to go through a large amount of data to accumulate (aggregate) some intermediate result, which becomes the final result after the loop terminates.
Sum of the Entered Numbers
A typical task in this category is summing a lot of values.
Task
Say the user is entering numbers, with the last one being 0. In other words, users indicate they are finished by entering 0. The program then displays the sum of all the entered numbers (see ...