Try this
if (Boolean expression 1)
{
// code 1
}
else if (Boolean expression 2)
{
// code 2
}
else
{
// code 3
}
In this way, Boolean expression 1 is tested. If it is satisfied, code block 1 is executed. If it is not, we test expression 2. If it is met, code block 2 is executed. If...