if (condition)
{
do this;
}
else
{
do that;
}
|
If the condition evaluates to true, then
the “do this ” statement
is executed.
If the condition evaluates to false, then the “do that ” statement
is executed.
|
if (condition1)
{
do this;
}
else if (condition2)
{
do that;
}
else
{
get this done;
}
|
If condition 1 evaluates to true, then
the “do this ” statement
is executed.
If condition1 evaluates to false and condition2 evaluates
to true, then the “do that ” statement
is executed.
If neither condition is true, then the “get
this done ” statement is executed.
This format may contain more than
one “else if () ” statement.
|