Can someone tell me if this is write?
Rewrite the following if/else/if structure as nested if elses.
if (status == ‘P’ && amount >= 10000)
due_flag = true;
else if (status == ‘P’)
time_remaining - = 1;
else if (status == ‘O’)
{
time_remaining = 0;
warning_flag = true;
}
This is what I have:
if (status == 'P' && amount >= 10000)
{
due_flag = true;
}
{
if (status == 'P')
{
time_remaining - = 1;
}
else (status == 'O')
{
time_remaining = 0;
warning_flag = true;
}
}