Created
February 17, 2017 02:19
-
-
Save Adals20/5958a95e2d3eb1967b3677506e1048e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
main(){ | |
int x1,x2,x3; | |
cout << "\tIntroduce tres numeros para acomodarlos de menor a mayor\n"; | |
cout << "Numero 1: "; cin >> x1; | |
cout << "Numero 2: "; cin >> x2; | |
cout << "Numero 3: "; cin >> x3; | |
cout << endl; | |
if (x1 <= x2 && x1 <= x3) | |
if (x2 <= x3){ | |
cout << x1 << endl; | |
cout << x2 << endl; | |
cout << x3 << endl; | |
}else{ | |
cout << x1 << endl; | |
cout << x3 << endl; | |
cout << x2 << endl; | |
} | |
if (x2 <= x1 && x2 <= x3) | |
if (x1 <= x3){ | |
cout << x2 << endl; | |
cout << x1 << endl; | |
cout << x3 << endl; | |
}else{ | |
cout << x2 << endl; | |
cout << x3 << endl; | |
cout << x1 << endl; | |
} | |
if (x3 <= x1 && x3 <= x1) | |
if (x1 <= x2){ | |
cout << x3 << endl; | |
cout << x1 << endl; | |
cout << x2 << endl; | |
}else{ | |
cout << x3 << endl; | |
cout << x2 << endl; | |
cout << x1 << endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment