Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
101733 | 郑博浩 | 三实数排序 | C++ | 通过 | 100 | 0 MS | 248 KB | 514 | 2023-09-10 20:21:17 |
#include<iostream> #include<cstdio> #include<bits/stdc++.h> using namespace std; int main(){ //freopen("forward.in","r",stdin); //freopen("forward.out","w",stdout); double a,b,c; cin>>a>>b>>c; if(a<b&&a<c){ cout<<a<<" "; if(b>c) cout<<c<<" "<<b; else cout<<b<<" "<<c; } else{ if(a>b&&a>c) if(b>c) cout<<c<<" "<<b<<" "<<a; else cout<<b<<" "<<c<<" "<<a; else if(b<c) cout<<b<<" "<<a<<" "<<c; else cout<<c<<" "<<a<<" "<<b; } return 0; }