Simple Flow Control

Thus far the instructions written in our programs are executed one line at a time from the beginning to the end.

However, we often need to have the program carry out different instructions and executes different parts of a program depending on certain conditions.

We can control the flow of the program better using a few branching mechanisms in C++.