Question: 4 . 1 1 LAB: Sort a vector Define a function named SortVector that takes a vector of integers as a parameter. Function SortVector (
LAB: Sort a vector
Define a function named SortVector that takes a vector of integers as a parameter. Function SortVector modifies the vector parameter by
sorting the elements in descending order highest to lowest Then write a main program that reads a list of integers from input, stores the
integers in a vector, calls SortVector and outputs the sorted vector. The first input integer indicates how many numbers are in the list.
Ex: If the input is:
the output is:
For coding simplicity, follow every output value by a comma, including the last one.
Your program must define and call the following function:
void SortVector vector
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
