You are viewing a single comment's thread. Return to all comments →
/* -------- With C# -------- */
public static List<int> gradingStudents(List<int> grades) { List<int> newGrade =new List<int>(); foreach(var grade in grades) { if(grade < 38) newGrade.Add(grade); else if(grade >=38) { int testN = 0; testN =((grade + 4)/5) * 5 ; if((testN - grade) <3) { newGrade.Add(testN); } else { newGrade.Add(grade); } } } return newGrade; }
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 →
/* -------- With C# -------- */