Wednesday, 7 November 2012

If - else Statement in C++

If-else Statement:

An if statement can be followed by an optional else statement, which executes when the Boolean expression becomes false.

 Syntax:

Syntax of an if-else statement in C+,

if(boolean_expression)
      statement(s) will execute if the boolean expression is true.
else
      statement(s) will execute if the boolean expression is false.
 

Flow Diagram:

 
 

1 comment:

  1. Description is perfect but it would be better if it was coded by c and c++ language.

    ReplyDelete