Question: Write a function named sortie that takes three integer parameters by reference and rearranges them in ascending order--the first parameter being the smallest, the third

Write a function named sortie that takes three integer parameters by reference and rearranges them in ascending order--the first parameter being the smallest, the third parameter being the largest. A comment in the file indicates where the function should be written.

#include using namespace std;

// WRITE YOUR sortie FUNCTION HERE

int main() { cout << "Enter three numbers "; int first, second, third; cin >> first >> second >> third; cout << endl; cout << "Unsorted: " << first << ", " << second << ", " << third << endl; sortie(first, second, third); cout << "Sorted: " << first << ", " << second << ", " << third << endl; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!