Question: C++ Program Using pointers Using pointers You are to write to compute some statistic information. You are to read a set of numbers from the
C++ Program
Using pointers
Using pointers
You are to write to compute some statistic information. You are to read a set of numbers from the input file numbers.txt. There will be less than 100 numbers in the file, so allocate your array for 100 locations dynamically. Read in the values and then sort the array.
Determine from the number in the array the mode. The mode is the value that occurs most often in the list of numbers. (A function) Find the median of the set of values. The median is the middle value in the list. If the list has an odd number of values, then select the middle one. If the list has an even number of values, then take the average of the two middle values in the list. The last action is to reverse the values in the array and then print out the first 32 values of the list, 8 numbers per line.
Restrictions: You must dynamically allocate your array. You must use pointer to manipulate the array.
No [ ]s are to be found in your code. You can use the [ ]s for new.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
