Average
Submissions: 3810   Accuracy:

42.89%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a stream of numbers, print average or mean of the stream at every point.

Input: The first line of input contains an integer T denoting the number of test cases.
For each test case there will be two lines. The first line contains an integer N denoting the size of array C[], and second line contains N space seperated integers C[i].

Output:
Print the average of the stream at every point (in integer).

Constraints:
1 ≤ T ≤ 20
1 ≤ N ≤ 50
1 ≤ C[i] ≤ 100

Example:
Input
2
5
10 20 30 40 50
2
12 2

Output
10 15 20 25 30
12 7

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: rajatjha


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.