2 条题解
-
1
using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; for(int i=1;i<=1;i++){ if(a>b && a>c){ cout<<"The maximum number is : "<<a<<endl; } if(b>a && b>c){ cout<<"The maximum number is : "<<b<<endl; } if(c>b && c>a){ cout<<"The maximum number is : "<<c<<endl; } else if(a==b || a==c){ cout<<"The maximum number is : "<<a<<endl; break; } else if(b==c){ cout<<"The maximum number is : "<<b<<endl; } } for(int i=1;i<=1;i++){ if(a<b && a<c){ cout<<"The minimum number is : "<<a<<endl; } if(b<a && b<c){ cout<<"The minimum number is : "<<b<<endl; } if(c<b && c<a){ cout<<"The minimum number is : "<<c<<endl; } else if(a==b || a==c){ cout<<"The minimum number is : "<<a<<endl; break; } else if(b==c){ cout<<"The minimum number is : "<<b<<endl; } } }
``` ``` “老土”真行!!!
- 1
信息
- ID
- 34
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 88
- 已通过
- 52
- 上传者