Average

The company has n employees. Each employee gets a salary. The company is interested in their expenses and would like to understand what’s the average amount they’re spending per employee. They ask you to write a program that would provide them with that data.
It is guaranteed that the number of employees is 5 ≤ n ≤ 8.
The first line of the input contains the number of employees n. The next n lines contain their salaries.
The program should print a single number - the average of the salaries.
Input
5
100
200
150
180
400

Output
206
Tip
You can read 5 inputs and then use an if statement to determine if reading more input is necessary and append it if more lines are present.
 
To check your solution you need to sign in
Sign in to continue