Question: Problem Write a C + + program that reads a text file containing integers ( one per line ) and calculates: The Mean. The Standard

Problem
Write a C++ program that reads a text file containing integers (one per line) and calculates:
The Mean.
The Standard Deviation (Population).
The Median.
Required functions
read_file : this function will receives a file path (thr txt file), and an array of double. This function will read the information from the txt file and store it into the given array.
Note: You need to identify if the array needs to be pass by value or reference.
mean : this function receives an array of double and compute the mean of the given numbers. (statistical mean).
median : this function receives an array of double and the length of the
loops and files
array as integer. This function compute median of a given set of numbers.
Note: You need to consider if the size of the array is even of odd to implement the right formula to compute the median.
std_deviation : this function receives an array of double, This function compute standard deviation of a given set of numbers. Note: the standard deviation is compute based on population.
Example Input (numbers.txt):
Expected output
Mean Value: 4.8
Median Value: 5
standard Deviation: 2.54
Problem Write a C + + program that reads a text

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!