Computer Science, asked by kajalrao200567, 4 months ago

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 priyadpriyadarshini3
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 krrishkhurana0807
0

Answer:

pya nhi okkkkkkkkkkkkkkkkkkkkkk

Explanation:

okkkk

Similar questions