The doLoop function
The doLoop function, begins in Listing 6.
The function consists of a sequence structure followed by a loop structure.
The sequence structure is shown in Listing 6.
Declare and initialize two local variables
The code in Listing 6 declares and initializes two local variables that are used later by the loop structure.