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
// 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
Get step-by-step solutions from verified subject matter experts
