#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int a = 0;
int b = 0;
int c = 0;
int d = 0;
scanf(" %d %d %d", &a, &b, &c);
if (a < b)
{
int tmp = a;
a = b;
b = tmp;
}
if (a < c)
{
int tmp = a;
a = c;
c = tmp;
}
if (b < c)
{
int tmp = b;
b = c;
c = tmp;
}
printf("三个数字从大到小排序为:%d %d %d\n", a, b, c);
return 0;
}
输入三个数字使其从大到小排序
最新推荐文章于 2024-01-17 23:40:41 发布