int main()
{
int a, b, c, temp;
printf("请输入三个数:");
scanf("%d %d %d", &a, &b, &c);
if (a > b)
{
temp = a;
a = b;
b = temp;
}
if (a > c)
{
temp = a;
a = c;
c = temp;
}
if (b > c)
{
temp = b;
b = c;
c = temp;
}
printf("a=%d,b=%d,c=%d\n", a, b, c);
}
三个数从小到大排列并输出
最新推荐文章于 2024-05-17 20:22:06 发布