rewrite the following using ternary operator. if (p>5000)d=p*5/100; else d=2*p/100
Answers
Answered by
0
d = p > 5000 ? p * 5 / 100 : 2 * p / 100;
Explanation:
d = p > 5000 ? p * 5 / 100 : 2 * p / 100;
Similar questions