+ 1

C programming question

The function named findNote, which returns a student's letter grade according to the data(score out of 100, class average, standard deviation) sent to it.

9th May 2021, 12:05 PM
ragnarok
ragnarok - avatar
1 Answer
+ 2
Here is a function to do what you're saying. You didn't say what percentage range applies to each letter so I assumed some. char findNote(int data) { if (data >= 80) return 'A'; else if (data >= 70) return 'B'; else if (data >= 60) return 'C'; else if (data >= 50) return 'D'; else return 'F'; }
9th May 2021, 12:47 PM
Josh Greig
Josh Greig - avatar