#include <stdio.h>
#include <conio.h>
void main()
{
int a,b,c,max=0,sum=0;
clrscr();
printf("Enter Value for Three Sides: ");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
if(a>c)
{
max=a;
}
else
{
max=c;
}
}
else
{
if(b>c)
{
max=b;
}
else
{
max=c;
}
}
sum=a+b+c-max;
if(sum>max)
{
printf("\nTriangular is possible");
}
else
{
printf("\nTriangular is not possible");
}
getch();
}
#include <conio.h>
void main()
{
int a,b,c,max=0,sum=0;
clrscr();
printf("Enter Value for Three Sides: ");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
if(a>c)
{
max=a;
}
else
{
max=c;
}
}
else
{
if(b>c)
{
max=b;
}
else
{
max=c;
}
}
sum=a+b+c-max;
if(sum>max)
{
printf("\nTriangular is possible");
}
else
{
printf("\nTriangular is not possible");
}
getch();
}
No comments:
Post a Comment