Turn a score into a grade: 90 and up is 'A', 60 to 89 is 'B', below 60 is 'C'. Write grade(score) to return the grade, so grade(72) is 'B'. This classic problem uses the conditional operator ? :. Try to do it in one line.
grade(95)→'A'grade(72)→'B'grade(45)→'C'char grade(int score)char grade(int score) {
char g = '?';
// your code here: use ? : to give g a grade from the score
return g;
}
Run tries the examples. When they look right, Submit.