Rewrite the following program segment using if-else statements instead of
ternary operator.
String grade=(marks>=90)?“A”:(marks>=80)?“B”:“C”
Answers
Answered by
6
Answer:
grade=(marks>=90)?“A”:(marks>=80)?“B”:“C
Answered by
38
if (marks >= 90)
grade = "A";
else if (marks >= 80)
grade = "B";.
else
grade = "C"
Similar questions