Deciding when to quit looping

The loop structure shown in Listing 7 uses a selection structure to decide when to quit looping.

The user is asked to enter an integer during each iteration of the loop.