代码如下:
#include<iostream>
using namespace std;
int main(){
int a,b,c;
int d1,d,ed,sd;
cin>>a>>b>>c;
d1=a>b ?a:b;
d=d1>c ?d1:c;
d1=c<b ?c:b;
sd=d1<a ?d1:a;
if (a!=d and a!=sd){
cout<<sd<<" "<<a<<" "<<d;
return 0;
}
if (b!=d and b!=sd){
cout<<sd<<" "<<b<<" "<<d;
return 0;
}
if (c!=d and c!=sd){
cout<<sd<<" "<<c<<" "<<d;
return 0;
}
return 0;
}