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