/*find the largest number from give 3 numbers */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 numbers a,b and c:\n");
scanf("%d %d %d",&a,&b,&c);
printf("largest number is : %d",(a>b?(a>c?a:c):(b>c?b:c)));
getch();
}
//thanx
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 numbers a,b and c:\n");
scanf("%d %d %d",&a,&b,&c);
printf("largest number is : %d",(a>b?(a>c?a:c):(b>c?b:c)));
getch();
}
//thanx
No comments:
Post a Comment