A C program to find largest number among 3.

// A program to find largest number among 3.

#include
#include
void main()
{
int a,b,c;
clrscr();
printf("Enter any three numbers:");
scanf("%d%d%d",&a,&b,&c);
if(a>b && a>c)
printf("Largest number:%d ",a);
else if(b>a && b>c)
printf("Largest number:%d ",b);
else if(c>a && c>b)
printf("Largest number:%d ",c);
getch();
}

Output:


c program to find largest number among 3, c programming examples, examples, excersize of c programming, largest among 3 numbers, write a program to find largest numbers among 3














Post a Comment

0 Comments