You are viewing a single comment's thread. Return to all comments →
Java Solution
public static List<Integer> gradingStudents(List<Integer> grades) { int i=0; for(int a:grades){ if(a<38){ grades.set(i,a); }else{ int nextMultipleOf5=((a/5)+1)*5; if((nextMultipleOf5-a)<3){ grades.set(i,nextMultipleOf5); }else{ grades.set(i,a); } } i++; } 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 →
Java Solution
}