Re-write the following using Ternary Operator.
int z=0;
if(x>y)
z=x-y;
else
z=y-x;
Answers
Answered by
1
Answer:
int z = 0;
z= if(x>y) ? x-y: y-x
Similar questions