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