Programming

If-Else Statement In C++

C++ … If-Else Statement

 

If-Else:

If-Else statement is a conditional statement used in C++. It is used to control the flow of program based on one or more than one conditions. This statement make decision on Boolean values. Flowchart of If-else statement.

Syntax:

 

Example1:

OUTPUT:

 

Example2:

OUTPUT:

 

 

 

1 Comment

1 Comment

Leave a Reply

Your email address will not be published.

Most Popular

To Top