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