#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);
printf("入力値: a=%d, b=%d, c=%d\n",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){
if(*x>*y)
swap(&*x,&*y);
if(*x>*z){
swap(&*x,&*z);}
if(*y>*z){
swap(&*y,&*z);}
}
void swap(int *x,int *y){
int w;
w=*x;
*x=*y;
*y=w;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgc2NhbmZhbGwoaW50ICp4LGludCAqeSwgaW50ICp6KTsKdm9pZCBhc2NlbmQoaW50ICp4LGludCAqeSwgaW50ICp6KTsKdm9pZCBzd2FwKGludCAqeCxpbnQgKnkpOwoKaW50IG1haW4odm9pZCkgewoJaW50IGEsYixjOwoJc2NhbmZhbGwoJmEsJmIsJmMpOwoJcHJpbnRmKCLlhaXlipvlgKQ6IGE9JWQsICBiPSVkLCAgYz0lZFxuIixhLGIsYyk7Cglhc2NlbmQoJmEsJmIsJmMpOwoJcHJpbnRmKCLmmIfpoIZhPSVkLCBiPSVkLCBjPSVkIixhLGIsYyk7CglyZXR1cm4gMDsKfQoKdm9pZCBzY2FuZmFsbChpbnQgKngsaW50ICp5LCBpbnQgKnopewoJc2NhbmYoIiVkIiwmKngpOwoJc2NhbmYoIiVkIiwmKnkpOwoJc2NhbmYoIiVkIiwmKnopOwp9Cgp2b2lkIGFzY2VuZChpbnQgKngsaW50ICp5LCBpbnQgKnopewoJaWYoKng+KnkpCgkJc3dhcCgmKngsJip5KTsKCWlmKCp4Pip6KXsKCQlzd2FwKCYqeCwmKnopO30KCWlmKCp5Pip6KXsKCQlzd2FwKCYqeSwmKnopO30KfQoJCnZvaWQgc3dhcChpbnQgKngsaW50ICp5KXsKCWludCB3OwoJdz0qeDsKCSp4PSp5OwoJKnk9dzsKfQo=