program 10: Accept three sides of triangle as input and print whether the triangle is valid or not.
void main()
{
int a,b,c;
printf("Enter
three sides of triangle:");
scanf("%d%d%d",&a,&b,&c);
if((a+b)>c)
{
printf("\nTriangle is valid");
}
else
{
printf("\nTriangle is invalid");
}
}
Output
[root@dhcppc0 SetB]# ./a.out
Enter three sides of triangle:3 6 8
Triangle is vaild
0 coment�rios: