fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int a, b, c;
  5. cin >> a >> b >> c;
  6. if (a <= b && b <= c) {
  7. cout << a << " " << b << " " << c << "\n";
  8. } else if (a <= c && c <= b) {
  9. cout << a << " " << c << " " << b << "\n";
  10. } else if (b <= a && a <= c) {
  11. cout << b << " " << a << " " << c << "\n";
  12. } else if (b <= c && c <= a) {
  13. cout << b << " " << c << " " << a << "\n";
  14. } else if (c <= a && a <= b) {
  15. cout << c << " " << a << " " << b << "\n";
  16. } else {
  17. cout << c << " " << b << " " << a << "\n";
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
-1446657104 21966 32764