void get2(int a,int b,int c){
int temp = 0;
if(a<b){
temp=b;
b=a;
a=temp;
}
if(a<c){
temp=c;
c=a;
a=temp;
}if(c<b){
temp=b;
b=c;
c=temp;
}
printf("%d %d %d\n",a,b,c);
}
main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
get2(a,b,c);
}
输入三个数字进行排序(冒泡原理)
最新推荐文章于 2023-01-05 17:15:21 发布