Question: Assignment 6: Make c code that Points: 10 Purpose: - Perform statistical computations - Process sets of data - Read from, and write to, files
Assignment 6:
Make c code that Points: 10
Purpose: - Perform statistical computations - Process sets of data - Read from, and write to, files - Use command-line arguments Description: ----------- Read a set of integer values from a file and determine the largest of the values, the average of the values, and the standard deviation of the values in the file. Two file names will be passed as command-line arguments, the first will be the input file name, the second the output file name. Each data file will contain an unknown number of integer values to process. Read the data values, compute the statistics, write the results to the output file. {Note: There is a formula for the standard deviation that does not require the mean to be applied to each data value, use that formula so that you can make a single pass through the data, and then compute the overall summary statistics after that single pass. } Output: ------ High: 9 Average: 6.6 S.D.: 2.073644 Notes: ----- - File names will be provided as command-line arguments - 1st is the data, 2nd is the output/results file - You should write several simpler programs as you develop your solution. Write programs that: Get file access working: - read input from a file and write output to a different file - use file names given on the command-line Start processing the data: - count the values in the file - compute the average of the values in the file - find the largest value in the file - write the results to the output file - compute the standard deviation - There are several sample data files in a directory named "data" in with the examples. Formula: Formula: n2 n(n-1 Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
