4. Write a multithreaded program that calculates variousstatistical values for a list of numbers. This program will bepassed a series of numbers on the command line and will then createfive separate worker threads. One thread will determine the averageof the numbers, the second will determine the maximum value, thethird will determine the minimum value, fourth will determine themedian value and the fifth will compute the std. deviation.
For example, suppose your program is passed the integers 90 8178 95 79 72 85
The program will report
The average value is 82.8
The minimum value is 72
The maximum value is 95
The median value is 81
The standard deviation is 7.2
The variables representing the average, minimum, and maximumvalues will be stored globally. The worker threads will set thesevalues, and the parent thread will output the values once theworkers have exited.