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
2
Answer:
inter y = (a > 5) ? x+2 : x-2;
Similar questions
Science,
19 days ago
Psychology,
19 days ago
Social Sciences,
19 days ago
Math,
1 month ago
English,
9 months ago
Social Sciences,
9 months ago
Math,
9 months ago