/*C++ program to print the given numbers in ascending order*/

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
cout<<“enter the values of a,b,c”;
cin>>a>>b>>c;
if(a<b&&a<c)
{
if(b<c)
{
cout<<a<<” “<<c<<” “<<b;
}
else
{
cout<<a<<” “<<c<<” “<<b;
}
}
else if(b<c)
{
if(a<c)
{
cout<<b<<” “<<a<<” “<<c;
}
else
{
cout<<b<<” “<<c<<” “<<a;
}
}
else
{
if(a<b)
{
cout<<c<<” “<<a<<” “<<b;
}
else
{
cout<<c<<” “<<b<<” “<<a;
}
}
getch();
}

91,987 total views, 394 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.

5,805 Thoughts to “C++ program to print the given numbers in ascending order”

  1. In fact when someone doesn’t be aware of after that its
    up to other people that they will help, so here it happens.

    Minecraft free to play 2018

  2. I reckon you discover something brand-new everyday. Regards, Murray Roper
    fjallraven online https://spectrumtraveltours.com/fjallraven/

Leave a Comment