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