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