Next: Loop scheme for a
Up: Unit 06
Previous: Common errors in writing
There are certain very common basic operations that require the use of loops:
- counter: count the number of values in a set;
- accumulator: accumulate values in a set according to a certain
criterion;
- characteristic values in a set: determine a characteristic value
among the values in a set (for example, the maximum, when the values in the
set are ordered).
Each type of operation is based on a common scheme of the loop statement.
Next: Loop scheme for a
Up: Unit 06
Previous: Common errors in writing