C++ · Loops

Counters, totals and the best so far

Loops that process data keep a running total, a count or the best value seen, and each needs a starting value before the loop.