#include <stdio.h>
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);
}
}
int main() {
int x, y;
sort(&x, &y);
printf("降順に並べ替えた結果: x = %d, y = %d\n", x
, y
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICphLCBpbnQgKmIpIHsKICAgIGludCB3OwogICAgIHcgPSAqYTsKICAgICphID0gKmI7CiAgICAqYiA9ICB3Owp9Cgp2b2lkIHNvcnQoaW50ICp4LCBpbnQgKnkpIHsKICAgIGlmICgqeCA8ICp5KSB7CiAgICAgICAgc3dhcCh4LCB5KTsgCiAgICB9Cn0KCmludCBtYWluKCkgewogICAgaW50IHgsIHk7CiAgICBzY2FuZigiJWQiLCAmeCk7CiAgICBzY2FuZigiJWQiLCAmeSk7CgogICAgc29ydCgmeCwgJnkpOwoKICAgIHByaW50Zigi6ZmN6aCG44Gr5Lim44G55pu/44GI44Gf57WQ5p6cOiB4ID0gJWQsIHkgPSAlZFxuIiwgeCwgeSk7CgogICAgcmV0dXJuIDA7Cn0K