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