Rewrite the following using ternary operator: if(a > b) { if
Rewrite the following using ternary operator:
if(a > b) { if (a > c) g = a; else g = c; } else if (b > c) g = b; else g = c;
197 Likes
g = a > b ? a > c ? a : c : b > c ? b : c;
Answered By
108 Likes