提交时间:2023-09-12 13:14:22

运行 ID: 102029

#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; }