fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int a, b, c, temp;
  5.  
  6. scanf("%d %d %d", &a, &b, &c);
  7.  
  8. if (a > b) {
  9. temp = a;
  10. a = b;
  11. b = temp;
  12. }
  13.  
  14. if (a > c) {
  15. temp = a;
  16. a = c;
  17. c = temp;
  18. }
  19.  
  20. if (b > c) {
  21. temp = b;
  22. b = c;
  23. c = temp;
  24. }
  25.  
  26. printf("%d %d %d\n", a, b, c);
  27.  
  28. return 0;
  29. }
  30.  
  31.  
  32.  
Success #stdin #stdout 0s 5288KB
stdin
9 7 8
stdout
7 8 9