int main()
{
int a = 0;
int b = 0;
int c = 0;
int mid = 0;
printf("please input 3 nums:");
scanf("%d%d%d", &a, &b, &c);
if (b > a)
{
mid = a;
a = b;
b = mid;
}
if (c > a)
{
mid = a;
a = c;
c = mid;
}
if (c > b)
{
mid = b;
b = c;
c = mid;
}
printf("%d>%d>%d", a, b, c);
return 0;
}
今日复习之“从大到小显示三个数”
最新推荐文章于 2024-10-27 19:55:47 发布