HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Search > problem:


50566 - Grade Point Average (GPA)

Guest
• Discussion of problem (1)

Section problems

• 50538 - Sum of kth Diagonal
• 50535 - Image Compression
• 50470 - Close Pairs - Revised
• 50459 - The Biggest Digit
• 50784 - Top Growing Company
• 50791 - Mine field
• 50867 - Average of the Best Grades
• 50460 - Median of 3 Numbers
• 50566 - Grade Point Average (...
• 50573 - Count and Sum
• 50575 - Number of Prime numbers
• 50576 - Number of Perfect numbers
• 50588 - Processing the list of numbers
• 50547 - Close Pair
• 50238 - The smallest number
• 50437 - Age Labeling
• 50457 - The Number of Winners

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
45 30 -2
Output 1
0
     
Input 2
20 82 71 -5
Output 2
1.67
     
Input 3
20 500 70 80 -1
Output 3
IMPROPER INPUT

Для отправки решений необходимо выполнить вход.

www.contester.ru