Computer Science, asked by okpandeygiti104, 9 months ago

14. Rewrite the following using ternary operator.
(a) if(income<=100000)
tax =0;
else
tax = (0.1*income);
(b) if(p>5000)
d = p*5/100;
else
d = p*2/100;​

Answers

Answered by da4729204
2

Answer:

a) tax = (income<=100000)?0 : 0.1*income

b) d = (p>5000)?p*5/100 : p*2/100

Similar questions