#include<iostream>
using namespace std;
int main()
{
int c1,c2,c3;
cout<<"please enter the first number here:";
cin>>c1;
cout<<"please enter the second number here:";
cin>>c2;
cout<<"please enter the third number here:";
cin>>c3;
cout<<"your numbers in assending order:";
if(c1<c2 && c1<c3 )
{
cout<<c1<<endl;
if(c2<c3)
{
cout<<c2<<endl;
cout<<c3<<endl;
}
else
{
cout<<c3<<endl;
cout<<c2<<endl;
}
}
else if(c2<c3 && c2<c1)
{
cout<<c2<<endl;
if(c3<c1)
{
cout<<c3<<endl;
cout<<c2<<endl;
}
else
{
cout<<c2<<endl;
cout<<c3<<endl;
}
}
else if(c3<c2&&c3<c1)
{
cout<<c3<<endl;
if(c1<c2)
{
cout<<c1<<endl;
cout<<c2<<endl;
}
else
{
cout<<c2<<endl;
cout<<c3<<endl;
}
}
}
No comments:
Post a Comment