We can write an entire if-else construct within either the body of the if statement or the body of the else statement. This is known as nesting.
The if statement can take any of the following forms:
do this;
if (condition)
{
do this;
and this;
}
if (condition)
do this;
else
do this;
{
do this;
and this;
}
else
{
do this;
and this;
}
if (condition)
do this;
else
{
if (condition)
do this;
else
do this;
}
{
if (condition)
do this;
else
{
do this;
and this;
}
}
else
do this;