fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c, d;
  6. cin >> a >> b >> c >> d;
  7. if (a > b) {
  8. int aux = a;
  9. a = b;
  10. b = aux;
  11. }
  12. if (a > c) {
  13. int aux = a;
  14. a = c;
  15. c = aux;
  16. }
  17. if (a > d) {
  18. int aux = a;
  19. a = d;
  20. d = aux;
  21. }
  22. if (b > c) {
  23. int aux = b;
  24. b = c;
  25. c = aux;
  26. }
  27. if (b > d) {
  28. int aux = b;
  29. b = d;
  30. d = aux;
  31. }
  32. if (c > d) {
  33. int aux = c;
  34. c = d;
  35. d = aux;
  36. }
  37. cout << a << " " << b << " " << c << " " << d;
  38. return 0;
  39. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
-1678646736 21877 32767 174991952