Monday, January 4, 2010

Biggest among three number


#include
#include

void main()
{
int a,b,c;
clrscr();
printf("enter value of a, b & c: ");
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(a>c))
printf("a is greatest");
if((b>c)&&(b>a))
printf("b is greatest");
if((c>a)&&(c>b))
printf("c is greatest");
getch();
}



Output:
enter value for a, b& c: 5
7
4
b is greatest

 

No comments:

Post a Comment