WRITE A PROGRAM TO PRINT THREE NOS. IN DESCENDING ORDER


#include<stdio.h>
#include<conio.h>
void main()
{
long int a,b,c,bg;
clrscr();

printf("ENTER THREE NOS.\n");

scanf("%ld%ld%ld",&a,&b,&c);
printf("DESCENDING ORDER \n");
if(a>=b&&a>=c)
{
printf("%d\n",a);
if(b>c)
{
printf("%d\n",b);
printf("%d\n",c);
}
else
{
printf("%d\n",c);
printf("%d\n",b);
}
}
else if(c>=b&&c>=a)
{
printf("%d\n",c);
if(b>a)
{
printf("%d\n",b);
printf("%d\n",a);
}
else
{
printf("%d\n",a);
printf("%d\n",b);
}
}

else
{
printf("%d\n",b);
if(a>c)
{
printf("%d\n",a);
printf("%d\n",c);
}
else
{
printf("%d\n",c);
printf("%d\n",a);
}
}
getch();
}

SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments