Control Flow
So far, we have created basic programs that perform a single task without making any decisions. Most (all but the most trivial) programming languages provide decision-making constructs (Conditional Branching). C++ provides two forms of branching. The “If Statement” and the “Switch Statement” . Note: Looping is also a form of branching. The looping concept is extensive enough that we will deal with looping separately in its own article. If Statement The “If Statement” allows code to be executed when a specific condition is fulfilled and optionally an alternative piece of code otherwise. ...