3个整数排序
程序代码:
#include<stdio.h>
int main(){
int t,temp;
int a[4];
scanf("%d",&t);
while(t--){
for(int i=0;i<3;i++){
scanf("%d",&a[i]);
}
for(int i=0;i<3;i++){
for(int j=i+1;j<3;j++){
if(a[i]<a[j]){
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
for(int i=0;i<3;i++)
printf("%d ",a[i]);
printf("%c",8);
printf("\n");
}
return 0;
}
嘤嘤嘤,哭死了,提交上去还是告诉我答案错误,,。大佬你们知道我哪有错吗









