December 23, 2018
The average of the array
Threads: Enter array of n integers. Calculate the average of the array.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: A unique number is the average of the array. Results rounded to 2 decimal.
For example:
input: 3 1 3 2 output: 2.00
You are not logged in? Log in to Submit Now!
2 Comments
Add a Comment
You must be logged in to post a comment.
1. Wrong Answer
Test Input:
4
2 4 5 1
Test Output:
3.00
Your Output:
6.00
oh admin, nó b iểu mình là tính trung bình mà,. sao output của ad ko ra trung bình nhỉ
à mà thôi, xong rồi