7. Rewrite the following program segment using if-else statements instead of the ternary operator .
(a) String grade = (marks>=90)?"A": (mark>=80)? "B": "C";
[ICSE 2014
(b) commission = (sale > 5000) ? sale 10/100 : 0);
(c) net = (salary > 10000) ? salary - (8.33/100)*salary: salary - (5/100)*salary
(d) s= (a+b <c ll a+c <= b || b+c <= a) ? "Triangle is not possible": "Triangle is
possible":
(e) c = (x >= 'A' && x<= 'Z') ? "Upper Case Letter" : "Lower Case Letter",
onerator
Answers
Answered by
0
Answer:
such as String, integer, float, double, boolean etc. ... If int a=27, b=4, c=0; then c = a%b; results in 3. 7. ... 7. Rewrite the following program segment using if-else statements instead of the ...
Answered by
0
Answer:
pya nhi okkkkkkkkkkkkkkkkkkkkkk
Explanation:
okkkk
Similar questions
Math,
2 months ago
Social Sciences,
2 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Hindi,
10 months ago