We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Would this be better? For reability only. Im not sure. It's really the same solution.
int[] res = new int[grades.Length];
for (int i = 0; i < grades.Length; i++)
{
int current = grade[i];
if (grades[i] % 5 > 2 && !(grades[i] < 38))
current = grades[i] + (5-grades[i]%5);
res[i] = current;
}
return res;
Grading Students
You are viewing a single comment's thread. Return to all comments →
Would this be better? For reability only. Im not sure. It's really the same solution.
int[] res = new int[grades.Length];