If....Else Statement

- If Statement
 - If.....Else Statement
 - If........Else If Statement
 
- If Statement
 
               If Statement is used for a decision and executable statement.  Condition is check and if it is a true then execute a Statement other wise skip the statement and go on the  other statement.
Syntax
if(Condition)
{
        Statement
}
Example

- If.......Else Statement
 
              If ......Else Statement is used for a decision and executable statement. If Condition check if it is true the execute a If Statement Other wise execute the Else Statement.
Syntax
if(Condition)
{
        Statement
}
Else
{
       Statement
}
Example
- If.......Else If Statement
 
              If ......Else If Statement is used for a decision and executable statement. The Condition is check if it is true the execute a If Statement Other Wise check the Else If Statement if any condition is not matched at that time at last execute the Else Statement.
Syntax
if(Condition)
{
        Statement
}
Else If(Condition)
{
       Statement
}
.
.
.
Else
{
       Statement
}
Example


No comments:
Post a Comment