go to home page   go to next page hear noise

Revised: 10/01/98, 08/04/99, 01/20/00, 03/30/00, 07/12/02, 03/05/06, 08/14/10, 06/20/14

CHAPTER 15 — Loops

Chapter Topics:

Most modern machines work by endlessly repeating the same motions. The engine in your car cycles through the same motions over and over as it burns gasoline to provide power. Electric motors are similar. They convert electric power into circular motion. Because of their circular motions, these machines keep going as long as you want.

Computer programs use cycles, also. In programming, a cycle is called a loop. When a program has a loop in it, some statements are done over and over as long as is needed to get the work done. Most computer programs execute many millions of program statements each time they are used. Usually the same statements are executed many times. This chapter discusses several kinds of programming loops.


Think of some machines (mechanical or other) that use cycles.