Code:
#include <stdio.h>
#include <stdlib.h>
void Exchg(int *px, int *py)
{
int tmp;
tmp = *px;
*px = *py;
*py = tmp;
}
int main(int argc, char *argv[])
{
int x,y,z,t;
while(scanf("%d%d%d",&x,&y,&z))
{
if(x > y)
Exchg(&x,&y); /*change x,y*/
if(x > z)
Exchg(&x,&z); /*change x,z*/
if(y > z)
Exchg(&y,&z); /*change z,y*/
printf("small to big: %d %d %d\n",x,y,z);
}
system("PAUSE");
return 0;
}

