A Bar Chart With a Reference Average Line
A shop manager at Alderwood Supply pins up daily sales as a bar per day, and asks for one dashed line ruled across the whole chart so that a glance says which days beat a typical day and which fell short. The line sits at the mean — every day's figure added together and shared equally between the days — not at the middle-ranked day. The caption under the chart repeats that figure in words, and the caption is what is checked here.
Task: Print the mean daily sales figure.
Input
The first line holds an integer n, the number of days. Each of the next n lines holds one day's sales figure.
Output
One line holding the mean, written with exactly two decimal places.
Example:
Input:
3
100
200
300
Output:
200.00
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in