You are viewing a single comment's thread. Return to all comments →
C++
int NextMultipleOfFive(int n) { return (((100 - n) % 5) + n); } vector<int> gradingStudents(vector<int> grades) { for(int i = 0; i < grades.size(); ++i) { if(38 > grades[i]) { continue; } else { int round = NextMultipleOfFive(grades[i]); if( 3 > (round - grades[i])) { grades[i] = round; } } } return grades; }
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++