- Related Questions & Answers
- C Program for Tower of Hanoi
- C++ Program for Dijkstra’s shortest path algorithm?
- C/C++ Program for nth Catalan Number?
- C Program to Multiply two Floating Point Numbers?
- C program to find the length of a string?
- C Program to Check if all digits of a number divide it
- C Program to Check if a Given String is a Palindrome?
- Write a program to Delete a Tree in C programming
- Write a C program to print “ Tutorials Point ” without using a semicolon
- Surface Area and Volume of Hexagonal Prism in C programming
- Sum triangle from an array in C programming
- Sum of the nodes of a Singly Linked List in C Program
- Sum of first n natural numbers in C Program
- C Program for simple interest?
- Area of a n-sided regular polygon with given Radius in C Program?

To find the area of a circle inside a right angled triangle, we have the formula to find the radius of the right angled triangle, r = ( P + B – H ) / 2.

Given the P, B and H are the perpendicular, base and hypotenuse respectively of a right angled triangle.

Area of a circle is given by the formula,

Area = π*r^{2}

where π = 22 / 7 or 3.14 and r is the radius of the circle.

Hence the area of the incircle will be given by the formula,

Area = π* ((P + B – H) / 2)^{2}.

#include #define PI 3.14159265 int main() { float area,P = 3, B = 4, H = 5; area=(P + B - H) * (P + B - H) * (PI / 4); printf("Area = %f", area); return 0; }

Area = 3.141593

Advertisements