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
English,
3 months ago
Science,
3 months ago
Social Sciences,
3 months ago
Physics,
7 months ago
Chemistry,
7 months ago
Biology,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago