Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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: 1380Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started