Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions