You are viewing a single comment's thread. Return to all comments →
public static List<Integer> gradingStudents(List<Integer> grades) { // Write your code here List<Integer> finalList = new ArrayList<>(); for(Integer num :grades){ if(num < 38){ finalList.add(num); }else if(num % 5 == 0 || num % 5 == 1 || num % 5 == 2){ finalList.add(num); }else if (num % 5 == 3){ finalList.add(num + 2); }else if (num % 5 == 4){ finalList.add(num + 1); } } return finalList; }
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 →