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 a triangle inside a parallelogram
- Area of Incircle of a Right Angled Triangle
- Program to find area of a triangle
- Area of Circumcircle of a Right Angled Triangle
- Find the altitude and area of an isosceles triangle
- Area of a largest square fit in a right angle triangle
- Area of largest triangle that can be inscribed within a rectangle
- Area of the Largest Triangle inscribed in a Hexagon
- Area of circle which is inscribed in equilateral triangle
- Find area of triangle if two vectors of two adjacent sides are given
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