C Programming
Computer Programming

Program in c to find the greatest of three number



Write a Program in c to find the greatest of three number

\* C Program to to find the greatest of three number *\

# include < stdio.h >
int   main( )
{

int   a, b, c ;
printf(" Enter the first Number : ") ;
scanf("%d ", & a) ;
printf(" \n Enter the second Number : ") ;
scanf("%d ", & b) ;
printf(" \n Enter the third Number : ") ;
scanf("%d ", & c) ;
if (   a   >=   b   &&   a   >=   c )
printf("\n The largest number is : %d ",a) ;
else
{

if (   b   >=   a   &&   b   >=   c )
printf("\n The largest number is : %d ",b) ;
else
printf("\n The largest number is : %d ",c) ;

}
return ( 0 ) ;

}

Output of Program:

Output of Program in C to find the greatest of three number