Question: In C++ please Write a program that has the following 5 functions: void declaration (); - displays the program declaration void displayarray (int [], int)
In C++ please
Write a program that has the following 5 functions:
- void declaration (); - displays the program declaration
- void displayarray (int [], int) - displays the content of the array with 20 numbers per line
- void initArray (int [], int) - initialize the array with the 200 random numbers between 20 - 200.
- int average(int [], int) - returns the average of the array's content
- int median(int [], int) - returns the middle number of the array, the array has to be sorted
The array will store 200 integer values. You must generate the numbers with the random numbers. After initializing the array with the contents from the file, display the content of the array with 25 numbers per line and properly aligned. Finally, display the original, followed by the sorted array, average and median numbers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
