append
int
main()
{
int
a, b, c;
scanf
(
"%d %d %d"
, &a, &b, &c);
compare(&a, &b, &c);
printf
(
"%d %d %d"
, a, b, c);
return
0;
}
#include <stdio.h>
#include <stdlib.h>
int compare(int*min,int*mid,int*max)
{
int t;
if(*min>*mid)
{
t=*mid;
*mid=*min;
*min=t;
}
if(*min>*max)
{
t=*max;
*max=*min;
*min=t;
}
if(*mid>*max)
{
t=*max;
*max=*mid;
*mid=t;
}
return *min,*mid,*max;
}