What grade did you get in your exam?
When students sit exams their total mark for a paper, called a raw mark is converted to a uniform mark scale (UMS). The UMS enables different units to be worth more or less than other units, or marked out of a different number of raw marks. Once all the UMS marks have been calculated, grade boundaries are decided to enable the results for each year to be similar to previous years. This balances one paper being harder than another.
⭐⭐⭐
Write a program that outputs the grade achieved from a mark, and the number of marks needed to achieve the next grade using the data in the table below.
Remember to add a comment before a subprogram or selection statement to explain its purpose.
grade that:mark that is an integer.| Mark | <2 | 2 | 4 | 13 | 22 | 31 | 41 | 54 | 67 | 80+ |
| Grade | U | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
marks_needed that:mark that is an integer.main program so that:Enter the mark 0-100: 50
A mark of 50 is grade 6
You needed 4 marks to achieve the next grade.
Enter the mark 0-100: 60
A mark of 60 is grade 7
You needed 7 marks to achieve the next grade.
Enter the mark 0-100: 80
A mark of 80 is grade 9
You needed 0 more marks to achieve the next grade.