Call by reference and dynamic memory

This is a sorting program.

You will need a program to read an unknown number of random integers as input. You need to sort the data and display some stats on it.

This will be done as functions, with no output in them. All input and output must be done in main, all computation in the functions, and the functions must have a void return type. The point of this is to get you to use call by reference.

You may sort the integers using any sort you want to write.

The stats I want reported are the number of integers input, the largest value input, the smallest value input, the mean average value of those integers, and the median average of those integers. The median is one value if the set is odd, two if it is even in elements.

Your array will need to be dynamic, since you don't know the size of the data set until it is read in.

This is due on September 17th.

The Goals

Here are some sample runs