
Repetition
control
structures
5.1 Repetition using the DOWHILE
structure
The solution algorithms developed so far have one characteristic in
common - they show the program logic required to process just one
set of input values. However, most programs require the same logic to
be repeated for several sets of data. The most efficient way to deal with
this situation is to establish a looping structure in the algorithm. This
will cause the processing logic to be repeated a number of times.
In Chapter 2, the DOWHILE construct was introduced as the
pseudocode representation of a repetitive loop. Its format is:
DOWHILE condition p is true
statemen ...