Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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