fork download
  1. #include <stdio.h>
  2.  
  3. void scanfall(int *x, int *y, int *z){
  4.  
  5. scanf("%d %d %d",&x,&y,&z);
  6.  
  7.  
  8. }
  9.  
  10. void ascend(int *x, int *y, int *z){
  11.  
  12. if(*x>*y) swap(x,y);
  13.  
  14. if(*x>*z) swap(x,z);
  15.  
  16. if(*y>*z) swap(y,z);
  17.  
  18. }
  19.  
  20. void swap(int *x, int *y){
  21.  
  22. int t;
  23. t=*x;
  24. *x=*y;
  25. *y=t;
  26.  
  27. }
  28.  
  29. int main(void) {
  30.  
  31. int x,y,z;
  32. ascend(&x,&y,&z);
  33. printf("%d\n",x);
  34. printf("%d\n",y);
  35. printf("%d\n",z);
  36.  
  37. return 0;
  38. }
  39.  
Success #stdin #stdout 0.01s 5528KB
stdin
3 2 1
stdout
0
0
0