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