#include<stdio.h>
int main()
{
int a, b, c;
printf("请输入三个数:");
scanf("%d%d%d", &a, &b, &c);
if (a < b)
{
int tmp = a;//引入变量交换各自的值:a的值赋给tmp
a = b;//b的值赋给a
b = tmp;//tmp的值赋给b即把a的值赋给b
}
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;
}