再次求助!80分QWQ
查看原帖
再次求助!80分QWQ
1082214
Zzhuangzhuang楼主2023/9/8 17:57
#include<bits/stdc++.h>
using namespace std;
int main(){
   int a,b,c; 
   cin>>a>>b>>c;
   if(a<b&&a<c){//此情况是a min。[p
     cout<<a<<" ";//先
     if(b<c)
        cout<<b<<" "<<c;
     else cout<<c<<" "<<b;//。。。 
   }
   else if(b<c){//!!
      cout<<b<<" ";
      if(a>c)cout<<a<<" "<<c;
      else cout<<c<<" "<<a;
   }
   else {//。。。
	  if (a<b){
	  	cout<<c<<" "<<a<<" "<<b;
	  }
	  else{
	  	cout<<c<<" "<<b<<" "<<a;
	  }
      
   }
	return 0;
}

到底错哪了QWQ

2023/9/8 17:57
加载中...