Computer Science, asked by vinaysaini3106, 6 months ago

rewrite the following using ternary operator. if (p>5000)d=p*5/100; else d=2*p/100​

Answers

Answered by mk4482623satyam
0

d = p > 5000 ? p * 5 / 100 : 2 * p / 100;

Explanation:

d = p > 5000 ? p * 5 / 100 : 2 * p / 100;

Similar questions