Reference no: EM132208507
Question :
Write a program that will calculate statistical information on a list of integer numbers.
1. Your main program must call three functions: readData, calculateStats, and saveResults.
2. Function readData will prompt the user for a file that contains the data, one number per line. Reads the data into the array and return the actual number of numbers read. Do not read more than the maximum number that your program can handle. Output "Too many values, max. = #"
3. Function calculateStats will return the double average and standard deviation via call by reference parameters. The function itself does not return anything.
4. Function saveResults will prompt the user for a file name to send the output to. The required output format:
Data: filename
### ### ### ### ### ###
...
### ###
Number of inputs: ###
Average: #.##
Standard deviation: #.##
The data are to be printed 6 values per line.
5. Your program must be able to process up to 100 numbers. Must use partially-filled array. Only process up to this maximum numbers and ignore the rest.
6. Call calculateStats only if there are data read from the file (actualSize > 0).
7. The result output file will contain all the numbers 10 per line follows by the average and standard deviation.
8. All data must be passed between the functions. NO global variables or arrays.