Question: C++ Please Create a function called sort6() which accepts 6 integer parameters and returns the sum of those integers. Also, the function sort6 will sort
C++ Please
Create a function called sort6() which accepts 6 integer parameters and returns the sum of those integers. Also, the function sort6 will sort the incoming integers and reorder the parameter list so that the numbers in the parameter list are increasing in value. Test your function by creating a main program which generates 6 random integers between 100 and 500, and then pass those numbers to the function. Also display the 6 parameters before they are passed to the function and display them again when you return from the function. Also print the sum of all the parameters by using the return value from the function. Runtime output sample Before sorting: 385 145 262 203 180 205 After sorting: 145 180 203 205 262 385 Total of all six numbers: 1380
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
