Given three angles. The task is to check if it is possible to have a triangle of positive area with these angles. If it is possible print “YES” else print “NO”.
Input : ang1 = 50, ang2 = 60, ang3 = 70 Output : YES Input : ang1 = 50, ang2 = 65, ang3 = 80 Output : NO
Approach: We can form a valid triangle if the below conditions satisfies:
- The sum of the three given angles equals to 180.
- The sum of any two angles is greater than equal to the third one.
- None of the given angles is zero.
Below is the implementation of the above approach:
- Check whether the triangle is valid or not if angles are given
- Find all angles of a triangle in 3D
- Find other two sides and angles of a right angle triangle
- Check whether Quadrilateral is valid or not if angles are given
- Area of Reuleaux Triangle
- Area of Incircle of a Right Angled Triangle
- Area of Circumcircle of a Right Angled Triangle
- Area of a triangle inside a parallelogram
- Program to find area of a triangle
- Area of the Largest Triangle inscribed in a Hexagon
- Area of largest triangle that can be inscribed within a rectangle
- Find the altitude and area of an isosceles triangle
- Area of circle which is inscribed in equilateral triangle
- Area of a largest square fit in a right angle triangle
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Mithun Kumar