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
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
Science,
4 months ago
Hindi,
4 months ago
Computer Science,
4 months ago
Hindi,
8 months ago
Chemistry,
1 year ago