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