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