fork download
  1. #include <stdio.h>
  2. void sort(int *x,int *y);
  3. void swap(int *x,int *y);
  4. int main(void) {
  5. // your code goes here
  6. int x=4, y=1;
  7. sort(&x,&y);
  8. printf("%d,%d",x,y);
  9. return 0;
  10. }
  11. void sort(int *x,int *y){
  12. if(*x<*y)
  13. swap(x,y);
  14. }
  15. void swap(int *x,int *y){
  16. int w;
  17. w=*x;
  18. *x=*y;
  19. *y=w;
  20.  
  21. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
4,1