Computer Science, asked by diwandhbakshi, 7 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 saloni1234sk
0

Answer:

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

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

Explanation:

Hope this is beneficial for you.

Similar questions