Question: Average and Standard deviation Write a C++ program that reads a list of numbers from a file named numbers. dat. The program should read the
Average and Standard deviation Write a C++ program that reads a list of numbers from a file named numbers. dat. The program should read the numbers, store them in a container (vector or array) and then compute the average and the standard deviation of the list of numbers. In addition, the program should output the computed average and standard deviation to both the standard output device and an output file named stats. dat. Note, if the grades are x1,x2,x3,x4, and x5, then the average is: x=(x1+x2+x3+x4+x5)5 and the standard deviation is: s=n(x1x)2+(x2x)2+(x3x)2+(x4x)2+(x5x)2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
