Revised 10/04/98, 08/08/99, 01/20/00, 07/13/02, 05/21/03


CHAPTER 18 — Sentinel Controlled Loops

The previous several chapters have discussed loops, and counting loops in particular. The same statements that are used to build counting loops are used to build other kinds of loops. This chapter will look at a kind of loop called a sentinel controlled loop.

Chapter Topics:

QUESTION 1:

Say that a program is to add up a list of numbers entered by the user from the keyboard. Will a loop be used in this program?