Rewrite The following using temary operator :if (in come<=10000) .tax=0, else tax=(.l0000)
Answers
Answered by
0
Answer:
tax = (income<=10000)? 0 : 10000;
Answered by
1
- Rewrite the following using ternary operator.
Given code,
if(income <=10000)
tax = 0;
else
tax = 10000;
The above code can be written using ternary operator as,
tax=(income<=10000)?0:10000;
Similar questions