Problem Statement
Grade Rounding
You are tasked with implementing a grade rounding system according to specific rules. This is commonly used in educational settings to round up student grades under certain conditions.
Rules
- If the grade is less than 38, do not round it.
- If the grade is 38 or higher, check the next multiple of 5:
- If the difference between the grade and the next multiple of 5 is less than 3, round the grade up to that multiple of 5.
- Otherwise, keep the grade unchanged.
Examples
- A grade of
84rounds up to85(difference is 1). - A grade of
29stays as29(less than 38). - A grade of
73rounds up to75(difference is 2). - A grade of
67stays as67(next multiple is 70, difference is 3, which is not less than 3).