#include <stdio.h>
void swap(int*a,int*b);
void sort(int*x,int*y);
int main(void){
int x,y;
printf("Before:x=%d,y=%d\n",x
,y
); sort(&x,&y);
printf("After:x=%d,y=%d\n",x
,y
); return 0;
}
void swap(int*a,int*b)
{
int w;
w=*a;
*a=*b;
*b=w;
}
void sort(int*x,int*y)
{
if (*x<*y){
swap(x,y);
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgc3dhcChpbnQqYSxpbnQqYik7CnZvaWQgc29ydChpbnQqeCxpbnQqeSk7CmludCBtYWluKHZvaWQpewoJaW50IHgseTsKCXNjYW5mKCIlZCVkIiwmeCwmeSk7CiAgICBwcmludGYoIkJlZm9yZTp4PSVkLHk9JWRcbiIseCx5KTsKICAgIHNvcnQoJngsJnkpOwogICAgcHJpbnRmKCJBZnRlcjp4PSVkLHk9JWRcbiIseCx5KTsKICAgIHJldHVybiAwOwp9CnZvaWQgc3dhcChpbnQqYSxpbnQqYikKewogICAgaW50IHc7CiAgICB3PSphOwogICAgKmE9KmI7CiAgICAqYj13Owp9CnZvaWQgc29ydChpbnQqeCxpbnQqeSkKewogICAgaWYgKCp4PCp5KXsKICAgICAgICBzd2FwKHgseSk7CiAgICB9Cn0K