#include <stdio.h>
void swap(int *a, int *b);
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 swap(int *a, int *b) {
int c;
c= *a;
*a = *b;
*b = c;
}
void sort(int *x, int *y) {
if (*x < *y) {
swap(x, y);
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICphLCBpbnQgKmIpOwp2b2lkIHNvcnQoaW50ICp4LCBpbnQgKnkpOwoKaW50IG1haW4odm9pZCkgewogICAgaW50IHgsIHk7CiAgICBzY2FuZigiJWQiLCAmeCk7CiAgICBzY2FuZigiJWQiLCAmeSk7CiAgICAKICAgIHNvcnQoJngsICZ5KTsKICAgIAogICAgcHJpbnRmKCIgeD0lZCwgeT0lZFxuIiwgeCwgeSk7CgogICAgcmV0dXJuIDA7Cn0KCgp2b2lkIHN3YXAoaW50ICphLCBpbnQgKmIpIHsKICAgIGludCBjOwogICAgYz0gKmE7CiAgICAqYSA9ICpiOwogICAgKmIgPSBjOwp9CgoKdm9pZCBzb3J0KGludCAqeCwgaW50ICp5KSB7CiAgIAogICAgaWYgKCp4IDwgKnkpIHsKICAgICAgICBzd2FwKHgsIHkpOyAKICAgIH0KfQ==