Question: How do i do this exercise? a) Modify the the merge() and mergeSort() functions so that they will work with the vectors. b) Write a
How do i do this exercise?
a) Modify the the merge() andmergeSort()functions so that they will work with the vectors.
b) Write a fillVector(T &vobj)function to load the vobjwith nrandom integer values where n is determined by the user at runtime.
c) Wrtie a displayVector(T &vobj)function to display only the first 10 randomly generated integer values if n is larger than 10.
d) Write a main()function that declares a vector object to be used to store random values. It then calls the above functions in proper sequence and displays the contents of the vobjbefore and after the sort operation. A sample output is provided for your reference.

C:\Windows system32\cmd.exe Enter # of random positive integers to be stored then sorted in the vector: 20 Before sort, the first 10 values in the vector are: 41 18467 6334 26500 19169 15724 11478 29358 26962 24464 After sort, the first 10 values in the vector are 41 491 299548275436 5705 6334 9961 11478 11942 Press anu key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
