C Language Program For Find The Largest Number Among Three Numbers


Posted Date:     Total Responses: 0    Posted By: rajesh kale   Member Level: Silver   Points/Cash: 4   


#include
#include
void main()
{
int A,B,C;
clrscr();
printf("\t\t PROGRAM FOR FIND THE LARGEST NUMBER AMONG THREE NUMBERS\N");
printf("\n ENTER THREE NUMBERS : - \n");
printf("\n A= ");
scanf("%d",&A);
printf("\n B=");
scanf("%d", &B);
printf("\n C=");
scanf("%d", &C);
if(A>B)
{
if(A>C)
{
printf("\n GRATEST NUMBER IS A= %d ",A);

}
else if(C>A)
{
printf("\n GREATEST NUMBER IS C= %d",C);
}
esle if(C==A)
{
printf("\n GRATEST NUMBER ARE A = C = %d",C);
}
}
else if(B>C)
{
if(B>A)
{
printf("\n GRATEST NUMBER IS B = %d", B);
}
if(B==A)
{
printf("\n GRATEST NUMBERS ARE A = B = %d", A);
}
}
esle if(C>A)
{
if(B==C)
{
printf("\n GREATEST NUMBERS ARE B=C=%d", C);
}
else
{
printf("\n GREATEST NUMBERS IS C=%d", C);
}
}
esle if(A==B && B==C)
{
{
printf("\n ALL ARE EQUAL A = B = C = %d", C);
}
}
getch();
}


Project Feedbacks


No feedbacks found. Be the first to respond...

Post Feedback
You must Sign In to post a feedback.
Next Project: C Language Program For Multiplication Of Two Matrices
Previous Project: Assembly language program for Binary search

Return to Project Index

Post New Project


Related Projects


Complete the action items below to enter to win an iPad Mini from India Study Channel! in India Study Channel - Locker on LockerDome
Awards & Gifts
Active Members
TodayLast 7 Daysmore...

 
ISC Technologies, Kochi - India. © All Rights Reserved.