Explicație:
#include<iostream>
using namespace std.
int main(){
int a, b, c;
cin>>a>>b>>c;
if(a<=b && a<=c){
if(b<=c) cout<<a<<" "<<b<<" "<<c;
else cout<<a<<" "<<c<<" "<<b;
}
if(b<=a && b<=c){
if(a<=c) cout<<b<<" "<<a<<" "<<c;
else cout<<b<<" "<<c<<" "<<a;
}
if(c<=b && c<=a){
if(b<=a) cout<<c<<" "<<b<<" "<<a;
else cout<<c<<" "<<a<<" "<<b;
}
return 0;
}