An alternative approach

Note that this program could also have been written by writing the conditional clause in Listing 7 as shown below:

while(quit == false){