◇1.16 ② 试写一算法,自大至小依次输出顺序输入的三个整数X,Y和Z的值。
#include <stdio.h>
int main()
{
int a,b,c,temp;
scanf("%d%d%d",&a,&b,&c);
if(a<b){
temp=b;
b=a;
a=temp;
}
if(b<c){
temp=c;
c=b;
if(temp<=a)b=temp;
else{
b=a;
a=temp;
}
}
printf("%d %d %d",a,b,c);
return 0;
}