Given the P, B and H are the perpendicular, base and hypotenuse respectively of a right angled triangle. The task is to find the area of the incircle of radius r as shown below:
Input: P = 3, B = 4, H = 5
Input: P = 5, B = 12, H = 13
Approach: Formula for calculating the inradius of a right angled triangle can be given as r = ( P + B – H ) / 2.
And we know that the area of a circle is PI * r2 where PI = 22 / 7 and r is the radius of the circle.
Hence the area of the incircle will be PI * ((P + B – H) / 2)2.
Below is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Program to calculate the Area and Perimeter of Incircle of an Equilateral Triangle
- Area of Circumcircle of a Right Angled Triangle
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Number of possible pairs of Hypotenuse and Area to form right angled triangle
- Find the height of a right-angled triangle whose area is X times its base
- Program to find the Radius of the incircle of the triangle
- Find the dimensions of Right angled triangle
- Find the hypotenuse of a right angled triangle with given two sides
- Check whether right angled triangle is valid or not for large sides
- Check if a right-angled triangle can be formed by moving any one of the coordinates
- Area of Reuleaux Triangle
- Find the coordinates of a triangle whose Area = (S / 2)
- Area of a triangle inside a parallelogram
- Area of a Triangle from the given lengths of medians
- Check if right triangle possible from given area and hypotenuse
- Program to find area of a triangle
- Minimum height of a triangle with given base and area
- Check if a triangle of positive area is possible with the given angles
- Area of largest triangle that can be inscribed within a rectangle
- Area of a largest square fit in a right angle 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 email@example.com. 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.