Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Prepared by Ibrahim Mesecan.
Grade Point Average (GPA)
Shqip
While spending the summer as an assistant at Epoka university, your professor asked you to write a
program that will take average grades (over 100) for a student and calculate his/her GPA.
100-grades are converted to letter grades as in the following table.
Grade | Letter Grade | GPA value |
From | To |
0 | 49 | FF | 0 |
50 | 59 | FD | 0.5 |
60 | 64 | DD | 1 |
65 | 69 | DC | 1.5 |
70 | 74 | CC | 2 |
75 | 79 | CB | 2.5 |
80 | 84 | BB | 3 |
85 | 89 | BA | 3.5 |
90 | 100 | AA | 4 |
Write a program that will read as many as average grades over 100 from the input, and then,
calculate and show the average GPA for the given student.
Note: When converting the marks into Grade Points, every mark is converted separately. Then, their sum and finally the average are calculated
Input specification
There will be a series of integer numbers between 0 ≤ n ≤ 1000 followed by a negative number.
Output specification
If any of the given numbers is greater than 100 show a message "IMPROPER INPUT". Otherwise, calculate
corresponding Grade Point Value and then show the cumulative Grade Point Average.
If the result is a whole number show with no decimal places.
Otherwise, show with at most two decimal places. That is, the number will be rounded to the nearest 100th digit, if it has more than two digits.
Input I b>
td> |
45 30 -2
td>
tr>
|
Output 1 b> td>
|
0
td> tr> |
|
Input 2 b>
td> |
20 82 71 -5
td>
tr>
|
Output 2 b> td>
|
1.67
td> tr> |
|
Input 3 b>
td> |
20 500 70 80 -1
td>
tr>
|
Output 3 b> td>
|
IMPROPER INPUT
td> tr> |
|
Для отправки решений необходимо выполнить вход.
|