28 lines
488 B
C
28 lines
488 B
C
/*-------------------------------------------------------
|
||
功能:输入三个整数x,y,z,请把这三个数由小到大输出。
|
||
--------------------------------------------------------*/
|
||
#include <stdio.h>
|
||
main()
|
||
{
|
||
int x,y,z,t;
|
||
scanf("%d%d%d",&x , &y , &z);
|
||
/**********Program**********/
|
||
if (x > y) {
|
||
t = x;
|
||
x = y;
|
||
y = t;
|
||
}
|
||
if (y > z) {
|
||
t = y;
|
||
y = z;
|
||
z = t;
|
||
}
|
||
if (x > y) {
|
||
t = x;
|
||
x = y;
|
||
y = t;
|
||
}
|
||
/********** End **********/
|
||
printf("small to big: %d %d %d\n",x,y,z);
|
||
}
|