#include <stdio.h>
//dai2kai
int a, b, c;
void scanfall(int *x, int *y, int *z);
void ascend(int *x, int *y, int *z);
void swap(int *x, int *y);
int main(void) {
int *x, *y, *z;
x = &a;
y = &b;
z = &c;
scanfall(x, y, z);
printf("入力:a=%d, b=%d, c=%d\n", *x
, *y
, *z
); ascend(x, y, z);
printf("昇順:a=%d b=%d c=%d\n", *x
, *y
, *z
); return 0;
}
void scanfall(int *x, int *y, int *z) {
}
void ascend(int *x, int *y, int *z) {
if (*x > *y) {
swap(x, y);
}
if (*y > *z) {
swap(y, z);
}
if (*x > *y) {
swap(x, y);
}
}
void swap(int *x, int *y) {
int w;
w = *x;
*x = *y;
*y = w;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8vZGFpMmthaQppbnQgYSwgYiwgYzsKdm9pZCBzY2FuZmFsbChpbnQgKngsIGludCAqeSwgaW50ICp6KTsKdm9pZCBhc2NlbmQoaW50ICp4LCBpbnQgKnksIGludCAqeik7CnZvaWQgc3dhcChpbnQgKngsIGludCAqeSk7CiAKaW50IG1haW4odm9pZCkgewogICAgaW50ICp4LCAqeSwgKno7CiAgICB4ID0gJmE7CiAgICB5ID0gJmI7CiAgICB6ID0gJmM7CiAgICBzY2FuZmFsbCh4LCB5LCB6KTsKICAgIHByaW50Zigi5YWl5Yqb77yaYT0lZCwgYj0lZCwgYz0lZFxuIiwgKngsICp5LCAqeik7CiAgICBhc2NlbmQoeCwgeSwgeik7CiAgICBwcmludGYoIuaYh+mghu+8mmE9JWQgYj0lZCBjPSVkXG4iLCAqeCwgKnksICp6KTsKICAgIHJldHVybiAwOwp9CiAKdm9pZCBzY2FuZmFsbChpbnQgKngsIGludCAqeSwgaW50ICp6KSB7CiAgICBzY2FuZigiJWQiLCB4KTsKICAgIHNjYW5mKCIlZCIsIHkpOwogICAgc2NhbmYoIiVkIiwgeik7Cn0KIAp2b2lkIGFzY2VuZChpbnQgKngsIGludCAqeSwgaW50ICp6KSB7CiAgICBpZiAoKnggPiAqeSkgewogICAgICAgIHN3YXAoeCwgeSk7CiAgICB9CiAgICBpZiAoKnkgPiAqeikgewogICAgICAgIHN3YXAoeSwgeik7CiAgICB9CiAgICBpZiAoKnggPiAqeSkgewogICAgICAgIHN3YXAoeCwgeSk7CiAgICB9Cn0KIAp2b2lkIHN3YXAoaW50ICp4LCBpbnQgKnkpIHsKICAgIGludCB3OwogICAgdyA9ICp4OwogICAgKnggPSAqeTsKICAgICp5ID0gdzsKfQ==