EngMostafa
03-18-2010, 03:52 PM
el brnmg twel shwya bs walhy nice mo7wla ,,el a5ta2 fnya bseta ana sa77to we yrt t2roh we tstfedo mno ,
#include"stdio.h"
#include"conio.h"
void main()
{
int a,b, c;
printf ("enter 3 number:");
scanf ("%d %d %d",&a,&b,&c);
if (a==b)
{
if (a>=c)
printf ("the longest number is:%d",a);
if (c>a)
printf ("the longest number is:%d",c);
}
if (c==b && a!=b && a!=c)
{
if (c>=a)
printf ("the longest number is:%d",c);
if (c<=a)
printf ("the longest number is:%d",a);
}
else if (a>b)
{
if (a>c)
printf ("the longest number is:%d",a);
else
printf ("the longest number is:%d",c);
}
else if (b>a)
{
if (b>c)
printf ("the longest number is:%d",b);
else
printf ("the longest number is:%d",c);
}
getch();
}
#include"stdio.h"
#include"conio.h"
void main()
{
int a,b, c;
printf ("enter 3 number:");
scanf ("%d %d %d",&a,&b,&c);
if (a==b)
{
if (a>=c)
printf ("the longest number is:%d",a);
if (c>a)
printf ("the longest number is:%d",c);
}
if (c==b && a!=b && a!=c)
{
if (c>=a)
printf ("the longest number is:%d",c);
if (c<=a)
printf ("the longest number is:%d",a);
}
else if (a>b)
{
if (a>c)
printf ("the longest number is:%d",a);
else
printf ("the longest number is:%d",c);
}
else if (b>a)
{
if (b>c)
printf ("the longest number is:%d",b);
else
printf ("the longest number is:%d",c);
}
getch();
}