Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
4637 高振轩 比较三个数大小II C++ Accepted 0 MS 268 KB 469 2024-08-24 16:31:40

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>c&&a>b&&c<b){ cout<<c<<" "<<b<<" "<<a<<endl; } else if(b>c&&b>a&&c>a){ cout<<a<<" "<<c<<" "<<b<<endl; } else if(c>b&&c>a&&a>b){ cout<<a<<" "<<b<<" "<<c<<endl; } else if(c>b&&c>a&&a>b){ cout<<b<<" "<<a<<" "<<c<<endl; } else if(a>c&&a>b&&c>b){ cout<<b<<" "<<c<<" "<<a<<endl; } else if(b>c&&b>a&&c<a){ cout<<c<<" "<<a<<" "<<b<<endl; } }