Question: c- Programming Modify the output stream of the program runProgram and add functions to compute statistics in the file statistics.c. Currently the program reads in





c- Programming
Modify the output stream of the program runProgram and add functions to compute statistics in the file statistics.c. Currently the program reads in a stream of integers from standard input. It assumes that there is 1 integer per line. The program starts reading when it encounters a non-positive number or character. You will need to add below statistics to statistics.c (and edit add prototypes to statistics.h), so that each statistics is computed in a separate function, also you will need to refine the output (in the function drivers() in the file getInput.c), so it looks exactly as depicted below" Input file (read from standard Input) 1 3 XXX Outputs exactly line up the ":"): Sum: 10.00 Average: 2.50 Sum of Squares : 30.0 Sample Variance: 1.25 Minimum: 1 Maximum: 4 Before you implement - runprogram prints out the correct Average of 2.50 as a running average, but not in the proper output format. Below is the output of the program before starting. The content of input04.txt is listed by the cat command below: {csci-odiningrid:86} cat input04.txt 4 1 3 XXX {csci-odin: ingrid:84} runprogram Entered ---> 2 -> Running Average ---> 2.00 -> Entered ---> 4 -> Running Average ---> 3.00 -> Entered ---> 1 -> Running Average ---> 2.33 -> Entered ---> 3 -> Running Average ---> 2.50 -> End of input Only getInput.c and statistics.c and statistics.h need to modified. In getInput.c you only modify the function driver. * getinput.c statistics.c statistics.h runProgram.c 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
