Rewrite the following using ternary operator: if (p >= 4750)
Rewrite the following using ternary operator:
if (p >= 4750) k = p * 5 / 100; else k = p * 10 / 100;
75 Likes
k = (p >= 4750) ? p * 5 / 100 : p * 10 / 100;
Answered By
44 Likes