Rewrite the following if-else statements as statements that use the conditional operator.
a)if (x > y)z = 1;elsez = 20;
b)if (temp > 45)population = base * 10;elsepopulation = base * 2;
c)if (hours > 40)wages *= 1.5;elsewages *= 1;
d)if (result >= 0)System.out.println("The result is positive.)";elseSystem.out.println("The result is negative.");
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.