Beginning C pp 135-183 | Cite as


  • Ivor Horton


In this chapter, you’ll learn how you can repeat a block of statements until some condition is met. The programming mechanism for this is called a loop. The number of times that a loop is repeated can be controlled simply by a count—repeating the statement block a given number of times—or it can be more complex—repeating a block until some condition is met, such as the user entering “quit”, for instance. The latter would enable you to program the calculator example in the previous chapter to repeat as many times as required without having to use a goto statement.


Outer Loop Nest Loop Loop Iteration Decrement Operator Loop Body 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Ivor Horton 2013

Authors and Affiliations

  • Ivor Horton

There are no affiliations available

Personalised recommendations