Question
For this assignment you may use regular pointers (This is in C++) You are to write a program that performs basic statistical analysis on a
For this assignment you may use regular pointers (This is in C++)
You are to write a program that performs basic statistical analysis on a 500 element array of integers. Your program should include the following programmer defined functions:
int* generateArray(int size){ This function should dynamically create an array of 501 elements and provide random numbers to fill the array. The random numbers should range from 10 to 100. The function should return the created array to the array generated in the main program.
}
int findMode(int *arr, int size){ This function should analyze the array to find the most occurring value in the array. You do not have to account for bi-modal occurrences, so the first modal value is enough to satisfy this function definition. }
int findMedian(int *arr, int size){ This function should determine the median of the set of numbers in the array. Since there are 501 elements, you should have a clean median. Do not forget that the list has to be sorted in order to properly find the median. }
Of course, main is critical to the function of your program and should output the mode, median of the list. An output of the 501 element array is not necessary.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started