#include <stdio.h>
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 a, b, c;
scanfall(&a,&b,&c);
ascend(&a,&b,&c);
printf("昇順: a=%d, b=%d, c=%d", a
, b
, c
);
return 0;
}
void scanfall(int *x, int *y, int *z){
}
void ascend(int *x, int *y, int *z){
while(1){
if (*x > *y)
swap(x, y);
else if (*y > *z)
swap(y, z);
else break;
}
}
void swap(int *x, int *y){
int w;
w = *x;
*x = *y;
*y = w;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHNjYW5mYWxsKGludCAqeCwgaW50ICp5LCBpbnQgKnopOwp2b2lkIGFzY2VuZChpbnQgKngsIGludCAqeSwgaW50ICp6KTsKdm9pZCBzd2FwKGludCAqeCwgaW50ICp5KTsKCmludCBtYWluKHZvaWQpIHsKCWludCBhLCBiLCBjOwoJCglzY2FuZmFsbCgmYSwmYiwmYyk7CgkKICAgIGFzY2VuZCgmYSwmYiwmYyk7CiAgICAKICAgIHByaW50Zigi5piH6aCG77yaIGE9JWQsIGI9JWQsIGM9JWQiLCBhLCBiLCBjKTsKICAgIAoJCgkKCXJldHVybiAwOwp9Cgp2b2lkIHNjYW5mYWxsKGludCAqeCwgaW50ICp5LCBpbnQgKnopewoJCglzY2FuZigiJWQiLCYqeCk7CglzY2FuZigiJWQiLCYqeSk7CglzY2FuZigiJWQiLCYqeik7CgkKfQoKdm9pZCBhc2NlbmQoaW50ICp4LCBpbnQgKnksIGludCAqeil7Cgl3aGlsZSgxKXsKCWlmICgqeCA+ICp5KQoJc3dhcCh4LCB5KTsJCgllbHNlIGlmICgqeSA+ICp6KQoJCXN3YXAoeSwgeik7CgllbHNlIGJyZWFrOwkKCX0KfQoKdm9pZCBzd2FwKGludCAqeCwgaW50ICp5KXsKCWludCB3OwoJdyA9ICp4OwoJKnggPSAqeTsKCSp5ID0gdzsKfQ==