(iv)
if(condition)
{
Statements;
Statements;
}
else
{
Statements;
Statements;
}
If the given condition is true then statements A will get executed otherwise statements B will get executed.
(v)
Nested if condition
if(condition-A)
{
Statements A;
}
else
{
if(condition-B)
{
Statements B;
}
else
{
if(condition-C)
{
Statements C;
}
else
{
Statements D;
}
}
}
If the given condition-A is true then statements A will get executed
otherwise
If the given condition-B is true then statements B will get executed
otherwise
If the given condition-C is true then statements C will get executed
otherwise
statements D will get executed
(vi)
Ladder if condition
if(condition-A)
Statement A;
else
if(condition-B)
Statement B;
else
if(condition-C)
Statement C;
else
Statement D;
If the given condition-A is true then statement A will get executed
otherwise
If the given condition-B is true then statement B will get executed
otherwise
If the given condition-C is true then statement C will get executed
otherwise
statements D will get executed