#include <iostream> using namespace std; int Fx(int x,int y,int z); int main() { int a,b,c; cin>>a>>b>>c; Fx(a,b,c); return 0; } int Fx(int x,int y,int z) { if(x>y&&y>z) cout<<x<<" "<<y<<" "<<z<<endl; else if (x>z&&z>y) cout<<x<<" "<<z<<" "<<y<<endl; else if (y>x&&x>z) cout<<y<<" "<<x<<" "<<z<<endl; else if (y>z&&z>x) cout<<y<<" "<<z<<" "<<x<<endl; else if (z>y&&y>x) cout<<z<<" "<<y<<" "<<x<<endl; else if(z>x&&x>y) cout<<z<<" "<<x<<" "<<y<<endl; }
时间: 2024-10-28 22:05:55