Rewrite the snippet using Ternary operators:
int c=0;
if(a<b)
{
c=(a+b);
}
else
{
c=(a-b);
}
Answers
Answered by
0
Answer:
int a = 10, b = 20, c;
if (a < b) { c = a; } else
{ c = b; } printf("%d", c);
Similar questions
Social Sciences,
2 months ago
Chemistry,
2 months ago
India Languages,
2 months ago
Science,
5 months ago
Hindi,
5 months ago
Math,
10 months ago
Math,
10 months ago
Science,
10 months ago