幕布斯7119047
#include<iostream>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;//输出最大if(a>b)if (c>a) cout<<c<<endl;else cout<<a<<endl;else if(c>b) cout<<c<<endl;else cout<<b<<endl;//输出最小if(a<b)if (c>a) cout<<a<<endl;else cout<<c<<endl;else if(c>b) cout<<b<<endl;else cout<<c<<endl;return 0;}这是简化版本#include<iostream>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;if(a>b) swap(a,b);if(a>c) swap(a,c);if(b>c) swap(b,c);//用a来存最小值,c来存最大值。cout<<c<<endl<<a;return 0;}