Commit 83d73d8d authored by Michael's avatar Michael

michael.davityan:exercise_06_33v5

parent 4a6de7f5
Pipeline #25392031 passed with stage
in 1 minute and 37 seconds
......@@ -28,13 +28,6 @@ qualityPoints(const int averageGrade)
if (100 == averageGrade) {
return 4;
}
int variableForAverageGrade = averageGrade / 10 % 10;
switch (variableForAverageGrade)
{
case 9 : return 4;
case 8 : return 3;
case 7 : return 2;
case 6 : return 1;
}
return 0;
int result = averageGrade / 10 - 5;
return (result > 0 ? result : 0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment