Computer Science, asked by Debangana6916, 1 year ago

Write a program to check whether a triangle is valid or not,



when the three angles of the triangle are entered through the



keyboard. a triangle is valid if the sum of all the three angles



is equal to 180 degrees.

Answers

Answered by AbhishekMohanty
3
class triangle
{
void main(int a,int b,int c)
{
int sum_of_angles_of_triangle=a+b+c;
if(sum_of_angles_of_triangle=180)
{
System.out.println("THE TRIANGLE IS VALID");
}
else
System.out.println("IT IS INVALID");
}
}
}

hope it helps u plzzz mark as beaniest ..

AbhishekMohanty: plzzz mark as braniest answer
Similar questions