Computer Science, asked by philipsjoshua642, 1 month ago

Rewrite the snippet using ternary operator: if(a>5)
int y=x+2;
else int y=x-2;

please show the solved answer,

Answers

Answered by DishaRoyRajput
2

Answer:

inter y = (a > 5) ? x+2 : x-2;

Similar questions