Question: Can you write this program for me in C++? E.2. Question 2: Sorting an Array of Numbers Write a program which inputs and sorts an
E.2. Question 2: Sorting an Array of Numbers Write a program which inputs and sorts an array of 10 numbers. Program Requirements: Use the header function you created in your last lab and call it with appropriate arguments. Declare an integer array of size 10 in the main function. Ask the user to input ten integers which should be stored in the above array. When the user has finished entering the numbers, the program will call three functions. o The first function will Accept the array as a parameter. Calculate the average of the array Return the average of the array. o The second function will Accept the array as a parameter. array from greatest to least. (See the tutorial called Sorting Array' below) o The third function will Accept the array as a parameter. array from least greatest. (See the tutorial called Sorting Array below) The main function will then print the average and the sorted array. The two functions cannot contain any cout statements, and you cannot use any global variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
