C++ if else Control Statement

if else control statement in C++ is used to control the program flow in a two-way direction. When condition returns a true value, then the program executes if condition block otherwise program executes else block.

Syntax:

C++ if else Example

Output:

Pin It on Pinterest

Share This