prepare a program which can be used to gather statistical data about the number of movies college students see in a month. The program must perform the following steps:
Read integers from movies.txt into a dynamically allocated array. The first number in movies.txt represents the number of students participating in this survey. Rest of the numbers represents the number of movies each student saw? Sort the array in ascending order by using Insertion Sort? Display the sorted array 10 numbers per line?
Compute and display the following:
b) Median: the value in the middle of a sorted array; if the array contains an even number of elements, the median is the average of the two middle elements.
c) Mode: the value which takes place most often (with the greatest frequency); if the array has no mode (none of the value takes place more than once), the mode is -1. If there is more than one mode, return one of them. For a more challenging assignment, store all values with the highest frequency in a dynamically allocated array.