Question: I need help writing a piece of code in C++: Here is the assignment I must complete. Your code will create several random set of
I need help writing a piece of code in C++: Here is the assignment I must complete.
Your code will create several random set of integers between 0-100 and store them in a dynamically created array; it will only create one array at a time. For each array it creates, it will calculate and print out the average, median, standard deviation, and interquartile range of the data and print them out.
Your code will require several functions:
A function to create an array of a given size and populate it with random values between 0-100. It should take as arguments the array size and return the array.
A function to calculate the average of an array. It should take as arguments the array and its size.
Similar functions for the median, standard deviation, and interquartile range.
Other functions may be required as you see fit.
You must use dynamic memory for the array (and properly delete the arrays after). Properly include your libraries (do no use "using namespace std").
The code must print out as follows:
How many rows does the table have (array size)? 100
Average 43.99
Median 42.5
Standard Deviation 27.4622
Interquartile Range 43
Continue (y/n)? y
Average 54.04
Median 57.5
Standard Deviation 27.4335
Interquartile Range 46
Continue (y/n)? n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
