Chapter 13. While Loops
In this chapter, you will learn the following:
This chapter continues the discussion of program loops that we began in Chapter 12, "The For Loop." However, the flavor of the loops changes a little from the For loops we studied earlier. You learned how For loops are often used when the number of iterations to be made through the loop is known before the loop begins to execute. In this chapter, we'll study While loops. While loops are often used when the number of loop iterations is not known when the loop begins executing.
In this chapter, you'll learn about three different types of While loops and how they differ from each other. You'll also learn what to consider when deciding between the various loop structures during program design.