The Coyote is currently taking
He wants to know how his new average will change depending on which course he decides to drop. He also wants to know which course he should drop to get closer to his goal.
Your task is to write a program that reads his courses and associated averages, then calculates his average before he drops his selected course, his average after he drops the course, and finally which course he should drop to get as high an average as he can.
Input Specification
The first line of input will consist of the single integer
The next 90%
).
The next line will contain the name of the course the Coyote wants to drop.
Output Specification
The first line of output should contain the Coyote's average prior to dropping a course, rounded to two decimal places and in % format.
The next line of output should contain his average after dropping a course, in % format and rounded to two decimal places.
The next line of output should contain the name of the course he should drop to have the largest positive increase in his mark. If there are two courses with the same lowest mark, output the first one that is inputted as the recommended course to drop.
The next line of output should contain his average if he drops the optimal course.
If his average after dropping the optimal course is over You have reached your goal.
Otherwise, output You are N% away from your goal.
, where
Sample Input
6
Math 95%
Physics 85%
English 80%
Chemistry 90%
TechDesign 90%
ComputerSciences 95%
Physics
Sample Output
89.17%
90.00%
English
91.00%
You are 4% away from your goal.
Comments