//this is a program to find largest among 3 numbers using if else ladder
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("\n\nEnter any 3 Numbers: ");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c)
{
printf("\n\nThe Largest Number is %d",a);
}
else if(b>a&&b>c)
{
printf("\n\nThe Largest Number is %d",b);
}
else if(c>a&&c>b)
{
printf("\n\nThe Largest Number is %d",c);
}
else
{
printf("\n\nAll Numbers are equal");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("\n\nEnter any 3 Numbers: ");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c)
{
printf("\n\nThe Largest Number is %d",a);
}
else if(b>a&&b>c)
{
printf("\n\nThe Largest Number is %d",b);
}
else if(c>a&&c>b)
{
printf("\n\nThe Largest Number is %d",c);
}
else
{
printf("\n\nAll Numbers are equal");
}
getch();
}