Write a Program to find ascending of three number


//This program is to find ascending of three number

#include<stdio.h>

main()
{
int a,b,c;
printf("Enter three Number\n");
scanf("%d%d%d",&a,&b,&c);

if(a>=b && a>=c)
{
if(b>=c)
printf("%d %d %d is order\n",c,b,a);
else
printf("%d %d %d is order\n",b,c,a);
}
else if(b>=a && b>=c)
{
if(a>=c)
printf("%d %d %d is order\n",c,a,b);
else
printf("%d %d %d is order\n",a,c,b);
}
if(c>=a && c>=b)
{
if(a>=b)
printf("%d %d %d is order\n",b,a,c);
else
printf("%d %d %d is order\n",a,b,c);
}

}




/*
INPUT:
Enter three Number
34
56
99
OUTPUT:
34 56 99 is order
*/

Comments