Write a multithreaded program that calculates the average, maximum and minimum values for a list of numbers.
This program will be passed a series of numbers on the command line and will then create three separate child threads.
One thread will determine the average of the numbers, the second will determine the maximum value, and the third will determine the minimum value.
The variables representing the average, minimum, and maximum values are global variables.
The child threads will set these values, and the parent thread will output the values once the child threads have exited.
You should pass a structure variable (which contains the list of numbers and their count) as an argument to the thread function g
For example, suppose your program is passed the integers
33 45 56 24 55 31 64
The program will report
The average is 44
The minimum is 24
The maximum is 64
(Test your code for a different list of integers – NOT the one listed above! - and show the output)
(using c language)