O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Doing Things More Than Once

Currently, each time you want to perform a division, you have to run the program. Fortunately, C++ offers several control structures, similar to the if statement, that repeatedly run the code in a block (this is called a loop). Loops use a bool expression to control whether the repetition should continue. This means that the program can perform its activity many times without stopping.

Control Structure

Any statement that changes the flow of control through the program. Normal control flow is from top to bottom in each function called. An if statement determines whether control flows to the then or else block. A try

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required