Question: Given the nested if-else structure below, answer questions below. if (a > 0) if (b < 0) x = x + 5; else if (a
Given the nested if-else structure below, answer questions below.
if (a > 0)
if (b < 0)
x = x + 5;
else
if (a > 5)
x = x + 4;
else
x = x + 3;
else
x = x + 2;
If x is currently 0, a = 0 and b = -5, what will x become after the above statement is executed?
Question 17 options:
| |||
| |||
| |||
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
