Computer Science
Rewrite the following statement using if-else:
net=(salary > 10000) ? salary — (8.33/100)*salary : salary — (5/100)*salary;
Java Conditional Stmts
3 Likes
Answer
if (salary > 10000)
net = salary — (8.33/100)*salary;
else
net = salary — (5/100)*salary;
Answered By
1 Like
Related Questions
A Java program executes but does not give the desired output. It is due to the
Rewrite the following statement using if-else:
commission=(sale > 5000) ? sale*10/100 : 0;
Rewrite the following statement using if-else:
s = (a + b < c || a + c <= b || b + c <= a) ? "Triangle is not possible": "Triangle is possible";
Rewrite the following statement using if-else:
c = (x >= 'A' && x <= 'Z') ? "Upper Case Letter": "Lower Case Letter";