fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  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 (b > c) {
  15. temp = b;
  16. b = c;
  17. c = temp;
  18. }
  19.  
  20. if (a > b) {
  21. temp = a;
  22. a = b;
  23. b = temp;
  24. }
  25.  
  26. printf("%d %d %d\n", a, b, c);
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0s 5320KB
stdin
9 7 1
stdout
1 7 9