CALCULATING RUNNING TOTAL

CALCULATING RUNNING TOTAL

A running total is a sum of numbers that accumulates with each iteration of a loop. The variable used to keep the running total is called an accumulator.
Programs that calculate the total of a series of numbers typically use two elements:
• A loop that reads each number in the series.
•A variable that accumulates the total of the numbers as they are read.