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:

  1. void declaration (); - displays the program declaration
  2. void displayarray (int [], int) - displays the content of the array with 20 numbers per line
  3. void initArray (int [], int) - initialize the array with the 200 random numbers between 20 - 200.
  4. int average(int [], int) - returns the average of the array's content
  5. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!