写代码,将三个数从大到小进行排列
作者:互联网
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int main()
{
int a = 0;
int b = 0;
int c = 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", a, b, c);
return 0;
}
标签:tmp,main,return,大到,int,代码,d%,include,数从 来源: https://blog.csdn.net/m0_55890292/article/details/121316664