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