You are viewing a single comment's thread. Return to all comments →
C# Solution
public static List<int> gradingStudents(List<int> grades) { var roundedGrades = new List<int>(); foreach(int grade in grades) roundedGrades.Add(RoundGrade(grade)); return roundedGrades; } public static int RoundGrade(int grade) { if(grade < 38) return grade; else return grade % 5 < 3 ? grade : ((grade / 5) + 1) * 5; }
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
C# Solution