Question: C++ Please code using C++ Write a program to fill a vector with 5000 random numbers. Then display: . The smallest number The largest number
Write a program to fill a vector with 5000 random numbers. Then display: . The smallest number The largest number . The number of odd values . The number of even values . The total of the values . The average of the values . Ask the user for an integer and display the subscript of the cell where it was found or NOT FOUND! if it isn't found. You will be using a binary search to locate the index of the integer requested by the user. Since you will be using a binary search, the vector will have to be in order. Under "Materials" in this week's module, there is a file that contains two functions that you will need to include in your code to sort your vector shellSort() and swapper). You can download the file, "Activity 25 Sort Functions.cpp," directly, of click the following link for a .zip file that contain:s t: Download and unzip the shellSort and swapper function Each of the preceding values should be determined by a function and returned to main where thev
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
