Question: Please create a C file that compiles with GCC (10 points) Max/Min/Avg/Med: Write a C program that calculates the maximum (Max). minimum (Min), average (Avg),

Please create a C file that compiles with GCC  Please create a C file that compiles with GCC (10 points)
Max/Min/Avg/Med: Write a C program that calculates the maximum (Max). minimum (Min),

(10 points) Max/Min/Avg/Med: Write a C program that calculates the maximum (Max). minimum (Min), average (Avg), and median (Med) values of a sequence of integers. For this problem, you will take input from the standard input and display your program's results in the standard output. The first line of the input is an integer T indicating the number of test cases your program should handle. T test cases follow. Each of the T test cases starts with the value N indicating the number of integers in the sequence. N integers would follow. Your program should print the following information (in the order of their appearance): the maximum value anong the N integers, the minimum value among the N integers, the average of the N integers, and the median of these N integers. Max, Min and Median should be of the int type while the average should be of the float type, Sample input: represents the new line character. Knewline> 10 17 4 Expected output for the sample input: Max: Min:3 Average:10.333333 Median: 10

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!