#include <stdio.h>
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = 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+Cgp2b2lkIHN3YXAoaW50ICphLCBpbnQgKmIpIHsKICAgIGludCB0ZW1wID0gKmE7CiAgICAqYSA9ICpiOwogICAgKmIgPSB0ZW1wOwp9Cgp2b2lkIHNvcnQoaW50ICp4LCBpbnQgKnkpIHsKICAgIGlmICgqeCA8ICp5KSB7CiAgICAgICAgc3dhcCh4LCB5KTsgCiAgICB9Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIGludCB4LCB5OwoKICAgIHByaW50ZigieCDjgpLlhaXlipvjgZfjgabjgY/jgaDjgZXjgYQ6ICIpOwogICAgc2NhbmYoIiVkIiwgJngpOwoKICAgIHByaW50ZigieSDjgpLlhaXlipvjgZfjgabjgY/jgaDjgZXjgYQ6ICIpOwogICAgc2NhbmYoIiVkIiwgJnkpOwoKICAgIHNvcnQoJngsICZ5KTsKCiAgICBwcmludGYoIumZjemghuOBq+S4puOBueabv+OBiOOBn+e1kOaenDogeCA9ICVkLCB5ID0gJWRcbiIsIHgsIHkpOwoKICAgIHJldHVybiAwOwp9Cg==