Match the conditional expression with the if-else statement that performs the same operation. a. q = x

Question:

Match the conditional expression with the if-else statement that performs the same operation. 

a. q = x < y ? a + b : x * 2;
b. q = x < y ? x * 2 : a + b;
c. q = x < y ? 0 : 1;
____ if (x < y)
 q = 0;
 else
 q = 1;
____ if (x < y)
 q = a + b;
 else
 q = x * 2;
____ if (x < y)
 q = x * 2;
 else
 q = a + b;

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: