Thursday, September 20, 2012

program for largest among 3 numbers

// program for largest among 3 numbers
#include<conio.h>
#include<stdio.h>                                    // program for largest among 3 numbers
void main()
{

int a,b,c,large;
clrscr();
printf("Enter the numbers\n");
scanf("%d%d%d",&a,&b,&c);
large= ( a>b?(a>c?a:c):(b>c?b:c) );   //program for largest among 3 numbers
printf("the large is \t%d",large);
getch();
}
 program for largest among 3 numbers

No comments:

Post a Comment