i have been asked to write a program that will get a series (unlimited) of real and positive numbers from the user. for every number in the series, the program will print the average of that number with his neighbors, so that we get a new series if numbers (the averages). if the user put a negative number, the program will stop working.
if the program gets the series: a1, a2, a3, a4
it shoul print: (a1+a2)/2, (a1+a2+a3)/3, (a2+a3+a4)/3, (a3+a4)/2