Question: // the program attempts to sort three integers // in increasing order, it is incomplete #include using std::cin; using std::cout; using std::endl; int main(){ //

// the program attempts to sort three integers // in increasing order, it is incomplete #include  using std::cin; using std::cout; using std::endl; int main(){ // inputs the numbers cout << "Enter three numbers: "; int x, y, z; cin >> x >> y >> z; int tmp; // orders x and y if (x > y){ tmp = x; x = y; y = tmp; } // orders y and z if (y > z){ tmp = y; y = z; z = tmp; } // outputs the sorted numbers cout << "The sorted numbers are: "; cout << x << " " << y << " " << z << endl; }

Can anyone help complete?

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!