Rewriting a conditional statement

Report a typo

How can you rewrite the following conditional statement using a ternary operator?

if (a - b > 0) {
    c = a - b;
} else {
    c = a + b;
}

All variables are integers.

Choose all suitable cases.

Select one or more options from the list
___

Create a free account to access the full topic