You are viewing a single comment's thread. Return to all comments →
my solution
static int[] solve(int[] grades) { int[] res = new int[grades.Length]; for (int i = 0; i < grades.Length; i++) { if (grades[i] % 5 > 2 && !(grades[i] < 38)) res[i] = grades[i] + (5-grades[i]%5); else res[i] = grades[i]; } return res; }
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 →
my solution