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