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