WAP that assign three angle
of a triangle and forints.
whether it is acute triangle,
obtuse triangle or right triangle.
Answers
Answered by
0
Answer:
Below program is written in C language
Explanation:
#include<stdio.h>
int main()
{
int a, b, c;
printf("Enter 3 angles of the triangle");
scanf("%d%d%d", &a, &b, &c);
if((a+b+c)==180)
{
if(a==90 || b==90 || c==90)
{
printf("It is a Right Triangle");
}
else if(a<90 && b<90 && c<90)
{
printf("It is an Acute Triangle");
}
else if((a>90 && b<90 && c<90) || (b>90 && a<90 && c<90) || (c>90 && a<90 && b<90))
{
printf("It is an Obtuse Triangle")
}
}
else
{
printf("It is not a Triangle")
}
return 0;
}
Similar questions