#include <stdio.h>
void scanfall(int *x,int *y,int *z){
scanf("%d %d %d", x
, y
, 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);
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 ascend(int *x,int *y,int *z){
if(*x>*y) swap(x,y);
if(*y>*z) swap(z,y);
if(*x>*y) swap(x,y);
}
void swap(int *x,int *y){
int tmp;
tmp=*x;
*x=*y;
*y=tmp;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHNjYW5mYWxsKGludCAqeCxpbnQgKnksaW50ICp6KXsKICAgIHNjYW5mKCIlZCAlZCAlZCIsIHgsIHksIHopOwp9Cgp2b2lkIGFzY2VuZChpbnQgKngsaW50ICp5LGludCAqeik7Cgp2b2lkIHN3YXAoaW50ICp4LGludCAqeSk7CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYSxiLGM7CglzY2FuZmFsbCgmYSwmYiwmYyk7CglwcmludGYoIuWFpeWKmzogYT0lZCxiPSVkLGM9JWQgXG4iLGEsYixjKTsKCWFzY2VuZCgmYSwmYiwmYyk7CglwcmludGYoIuaYh+mghjogYT0lZCxiPSVkLGM9JWQgXG4iLGEsYixjKTsKCXJldHVybiAwOwp9Cgp2b2lkIGFzY2VuZChpbnQgKngsaW50ICp5LGludCAqeil7CglpZigqeD4qeSkgc3dhcCh4LHkpOwoJaWYoKnk+KnopIHN3YXAoeix5KTsKCWlmKCp4Pip5KSBzd2FwKHgseSk7Cn0KCnZvaWQgc3dhcChpbnQgKngsaW50ICp5KXsKCWludCB0bXA7CgkKCXRtcD0qeDsKCSp4PSp5OwoJKnk9dG1wOwp9