Skip to Main Content
Sams Teach Yourself C++ in 24 Hours, fifth edition
book

Sams Teach Yourself C++ in 24 Hours, fifth edition

by Jesse Liberty, Rogers Cadenhead
April 2011
Beginner content levelBeginner
464 pages
9h 18m
English
Sams
Content preview from Sams Teach Yourself C++ in 24 Hours, fifth edition

Hour 6. Controlling the Flow of a Program

Looping

One of the things that a computer excels at is doing the same thing over and over again. Software doesn’t get tired.

Many programming tasks are accomplished by doing the same thing either a fixed number of times or until a specific condition is met. A block of code that’s executed more than once in a row in a program is called a loop. Each pass through the loop is called an iteration.

These terms will come in handy as you learn during this hour about while loops, do-while loops, and for loops.

while Loops

A while loop causes a program to repeat ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself C++ in 24 Hours, Sixth Edition

Sams Teach Yourself C++ in 24 Hours, Sixth Edition

Rogers Cadenhead, Jesse Liberty

Publisher Resources

ISBN: 9780672331855Purchase book