The If/Else statement lets you choose between two alternative actions in your program, which happens to be a very common requirement.
Click here to download source code for this tutorial.
Next: C++ Tutorial for Beginners 14 - If/Else/Else-If - Choosing Between Multiple Options
Previous: C++ Tutorial for Beginners 12: The “(If)” Statement
Click here to see more in "C++ for Complete Beginners"