Given a right angled triangle with height l, base b & hypotenuse h.We need to find the area of the largest square that can fit in the right angled triangle.
Input: l = 3, b = 4, h = 5 Output: 2.93878 The biggest square that can fit inside is of 1.71428 * 1.71428 dimension Input: l = 5, b = 12, h = 13 Output: 12.4567
Considering the above diagram, we see,tanx = l/b.
Here it is also true that, tanx = a/(b-a).
So, l/b = a/(b-a) which means that, a = (l*b)/(l+b)
Below is the required implementation:
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Area of the Largest Triangle inscribed in a Hexagon
- Area of largest triangle that can be inscribed within a rectangle
- Area of the Largest square that can be inscribed in an ellipse
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Find other two sides of a right angle triangle
- Find other two sides and angles of a right angle triangle
- Maximum number of squares that can fit in a right angle isosceles triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Area of Reuleaux Triangle
- Program to find area of a triangle
- Area of a triangle inside a parallelogram
- Area of Incircle of a Right Angled Triangle
- Area of Circumcircle of a Right Angled Triangle
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.