TotalAverage Exercise

Write a program TotalAverage that reads a list of positive numbers terminated by a negative number and then prints the total and average.

[solution]