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