Answered step by step
Verified Expert Solution
Link Copied!

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:

  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

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_2

Step: 3

blur-text-image_3

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

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions