/*read three inputs from user and return the largest number*/
#include<stdio.h>
void main()
{
int a,b,c;
printf("enter your number");
scanf("%d%d%d",&a,&b,&c);
if((a!=b) && (b!=c) && (a!=c))
{
if((a>b) && (a>c))
{
printf("largest number is a->%d",a);
}
else
{
if((a<b) && (b>c))
{
printf("largest no. is b-%d",b);
}
else
{
printf("largest no. is c-%d",c);
}
}
}
else
{
printf("numbers are equal");
}
}
No comments:
Post a Comment