Additional Concepts

Counters

A counter is always incremented by 1 inside of a loop, and is used to count how many.

Accumulators

An accumulator is used to calculate a cumulative quantity inside a loop.

Example:

To calculate your test average, you would first need to count how many tests you've take. This value is stored in a counter variable. Then, you would need to know the sum of all the grades on your tests. This value is stored in an accumulator variable. Finally, divide the sum of the grades (accumulator) by the number of tests (counter) to get your average.