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