Post Page Advertisement [Top]

C-Programming

Write a program in c to find largest in three number??

Write a program in c to find largest in three number??
 Image result for c programming hd images
Code:-

#include<stdio.h>
#include<conio.h>
void main()
{int a,b,c;
printf("\n enter a number");
scanf("%d",&a);
printf("\n enter a number");
scanf("%d",&b);
printf("\n enter a number");
scanf("%d",&c);
if (a>b)
{
if (a>c)
{
printf("\n %d is largest.",a);

}
else
{
printf("\n %d is largest.",b);
}
}
else
{
if (b>c)
{
printf("\n %d is largest.",b);
}
else
{
printf("\n %d is largest.",c);
}
getch();
}



DizIT_Operators
Thank-You 


No comments:

Post a Comment

Bottom Ad [Post Page]