3 条题解
-
412226蔡新航 (12226蔡新航) LV 7 @ 2021-11-01 16:29:42
#include<iostream>
#include<cmath>
using namespace std;
int main( )
{
int a,b,c;
cin>>a>>b>>c;
if(a>b)
if(b>c)
cout<<a<<" "<<b<<" "<<c;
else if(c>a)
cout<<c<<" "<<a<<" "<<b;
else
cout<<a<<" "<<c<<" "<<b;
else
if(a>c)
cout<<b<<" "<<a<<" "<<c;
else if(c>b)
cout<<c<<" "<<b<<" "<<a;
else
cout<<b<<" "<<c<<" "<<a;
return 0;
} -
12021-10-29 21:05:34@
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a<b)
if(c<a)
cout<<b<<' '<<a<<' '<<c<<endl;
else
if(b<c)
cout<<c<<' '<<b<<' '<<a<<endl;
else
cout<<b<<' '<<c<<' '<<a<<endl;
else
if(c<b)
cout<<a<<' '<<b<<' '<<c<<endl;
else
if(a<c)
cout<<c<<' '<<a<<' '<<b<<endl;
else
cout<<a<<' '<<c<<' '<<b<<endl;
return 0;
}
//👍👍 -
02023-05-23 21:42:19@
#include<iostream>
#include<cmath>
using namespace std;
int main( )
{
int a,b,c;
cin>>a>>b>>c;
if(a>b)
if(b>c)
cout<<a<<" "<<b<<" "<<c;
else if(c>a)
cout<<c<<" "<<a<<" "<<b;
else
cout<<a<<" "<<c<<" "<<b;
else
if(a>c)
cout<<b<<" "<<a<<" "<<c;
else if(c>b)
cout<<c<<" "<<b<<" "<<a;
else
cout<<b<<" "<<c<<" "<<a;
return 0;
}*好像只有这种方法...*
- 1
信息
- ID
- 1707
- 难度
- 3
- 分类
- (无)
- 标签
- 递交数
- 277
- 已通过
- 147
- 通过率
- 53%
- 被复制
- 2
- 上传者