Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, b, c;
- cin >> a >> b >> c;
- if(a<=b and a<=c) {
- if(b>=c) {
- cout << a <<" "<< c <<" "<< b <<endl;
- } else {
- cout << a <<" "<< b <<" "<< c <<endl;
- }
- }
- else if(b<=a and b<=c) {
- if(a<=c) {
- cout << b <<" "<< a <<" "<< c <<endl;
- } else {
- cout << b <<" "<< c <<" "<< a <<endl;
- }
- }
- else{
- if(a<=b){
- cout << c <<" "<< a <<" "<< b <<endl;
- }else {
- cout << c <<" "<< b <<" "<< a <<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment