Question: Write a function that calculates the average, minimum, and maximum of the arguments that you give on the command line. For example, if the program

 Write a function that calculates the average, minimum, and maximum of

Write a function that calculates the average, minimum, and maximum of the arguments that you give on the command line. For example, if the program is called stats, you should get the following output: 7 3 $ ./stats 2 9 8 Average is 5.8 Minimum is 2 Maximum is 9 Your main program should look like the following: #include #include int main(int arge, char **argv) double values (10]; int i; double average = 0; int min, max; int numvalues = argc-1; if (numvalues > 10) { printf("Too many values "); exit (-1); for (i=1; i

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 Databases Questions!