You are viewing a single comment's thread. Return to all comments →
That's the code to do: "If the difference between the grade and the next multiple of 58 is less than 3, round grade up to the next multiple of 5."
The "If the difference between the grade and the next multiple of 58 is less than 3" corresponds to
if (gradeMod5 > 2)
The "round grade up to the next multiple of 5" corrsponds to
grade += 5 - gradeMod5;
HackerRank solutions.
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 →
That's the code to do: "If the difference between the grade and the next multiple of 58 is less than 3, round grade up to the next multiple of 5."
The "If the difference between the grade and the next multiple of 58 is less than 3" corresponds to
The "round grade up to the next multiple of 5" corrsponds to
HackerRank solutions.