Running Totals

The running total algorithm uses a loop and variable (often called 'total'). It keeps adding to the total until the end of the loop, then shows the final values.

Task 7 (Running Total in a Loop)

A running total could be used to calculate an average. After the final total has been found, dividing by the number of values would produce the average.

This program calculates the average mark in a class test. It already contains an array of marks. Complete the program to calculate and show the average.

Reset Get feedback

Next task