Josif_tepe

Untitled

Jan 22nd, 2026
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     int a, b, c;
  12.  
  13.     cin >> a >> b >> c;
  14.  
  15.     if(a<=b and a<=c) {
  16.         if(b>=c) {
  17.             cout << a <<" "<< c <<" "<< b <<endl;
  18.         } else {
  19.         cout << a <<" "<< b <<" "<< c <<endl;
  20.         }
  21.     }
  22.     else if(b<=a and b<=c) {
  23.         if(a<=c) {
  24.             cout << b <<" "<< a <<" "<< c <<endl;
  25.         } else {
  26.         cout << b <<" "<< c <<" "<< a <<endl;
  27.         }
  28.     }
  29.     else{
  30.         if(a<=b){
  31.             cout << c <<" "<< a <<" "<< b <<endl;
  32.         }else {
  33.         cout << c <<" "<< b <<" "<< a <<endl;
  34.         }
  35.     }
  36.     return 0;
  37. }
  38.  
  39.  
  40.  
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment