You are viewing a single comment's thread. Return to all comments →
var result: Array<Int> = Array<Int>(grades.size) { 0 } var counter = 0 for(grade: Int in grades) { if (grade < 38) { result[counter] = grade counter++ } else { if(grade % 10 in (3..4) || grade % 10 in (8..9)) { result[counter] = grade - grade % 5 + 5 counter++ } else { result[counter] = grade counter++ } } } return result
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 →