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
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 ..
{
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
Social Sciences,
8 months ago
Business Studies,
8 months ago
Computer Science,
1 year ago
Math,
1 year ago
English,
1 year ago