When the end of file is reached, print out the count of the values, the average, and the standard deviation.
The average of a data set
is
The standard deviation is
However that formula is not suitable for our task.
By the time you have computed
the mean, the individual xi's are long gone.
Until you know how to save these values, use the numerically less stable formula
You can compute this quantity by keeping track of the count, the sum, and the sum of squares as you process the input values.