Книга: Practical Programming, Fourth Edition
Назад: Exercises
Дальше: Processing Items in a List

Chapter 9
Repeating Code Using Loops

Repeating a block of
code is a fundamental
way to control a
program’s behavior

This chapter introduces another fundamental kind of control flow: repetition. Up to now, to execute an instruction two hundred times, you would need to write that instruction two hundred times. Now, you’ll see how to write the instruction once and use loops to repeat that code the desired number of times.

Назад: Exercises
Дальше: Processing Items in a List