Given three integers A, B and C which are the three angles of a possible triangle in degrees, the task is to check whether the triangle is valid or not.
Input: A = 60, B = 40, C = 80
Input: A = 55, B = 45, C = 60
Approach: A triangle is valid if the sum of the three angles is equal to 180 degrees.
Below is the implementation of the above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check whether Quadrilateral is valid or not if angles are given
- Check if a triangle of positive area is possible with the given angles
- Check whether triangle is valid or not if three points are given
- Check whether triangle is valid or not if sides are given
- Check whether right angled triangle is valid or not for large sides
- Find all angles of a given triangle
- Find all angles of a triangle in 3D
- Find other two sides and angles of a right angle triangle
- Length of remaining two sides of a Triangle from a given side and its adjacent angles
- Check if an N-sided Polygon is possible from N given angles
- Check if the given Prufer sequence is valid or not
- Program to check if a date is valid or not
- Check if the given Binary Expressions are valid
- Check whether the given string is a valid identifier
- Check if the number is valid when flipped upside down
- Check if right triangle possible from given area and hypotenuse
- Check if a right-angled triangle can be formed by the given coordinates
- Check whether a given point lies inside a triangle or not
- Check if a right-angled triangle can be formed by moving any one of the coordinates
- Check if Pascal's Triangle is possible with a complete layer by using numbers upto N
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.