2025-03-06 22:45:14 +08:00

28 lines
488 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*-------------------------------------------------------
功能输入三个整数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);
}