i need to write a program that reads a sequence of natural numbers ending with '-1', calculates the average, and prints the firrence between the average and each number, one per line. there are at least 10 numbers, but no more than 40.
e.g
10
20
30
40
40
60
70
80
90
101
-1 (average is 50) gives
40
30
20
10
0
-10
-20
-30
-40
-51
51
i need serious help, i'm majourly stuck