Question: This should be a C++ program. Write a program that can read a list of numbers, find their average, sort the numbers, and search the

This should be a C++ program. Write a program that can read a list of numbers, find their average, sort the numbers, and search the average. The detailed tasks are described below. 1) Write a function named EvenOrOdd, which inspects the argument and returns an integer value. If the argument is even, the function returns 0; if odd, returns 1. 2) Write a function named ArrayAverage, which returns the average of an array. 3) Read 6 integers from the users input and store them in an array named numbers. Display the array elements (in the original order). 4) Declare an integer variable named avg. Call the function ArrayAverage to compute the average of the elements in the array numbers, and assign it to avg. 5) If avg is even, do the bubble sorting; if odd, do the selection sorting. In both cases, sort the array to an ascending order. Display the sorted array elements on the screen. 6) Apply the binary searching to find whether avg is in the array numbers. Display the searching result on the screen.

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 Databases Questions!