Home > Backend Development > C++ > body text

What is the area of ​​a circle inscribed in an equilateral triangle?

WBOY
Release: 2023-09-22 10:57:03
forward
1460 people have browsed it

What is the area of ​​a circle inscribed in an equilateral triangle?

The area of ​​the inscribed circle of an equilateral triangle can be found using the following formula Mathematical formula πa2/12.

Let us see how this formula is derived,

The formula for the radius of an inscribed circle = the area of ​​a triangle / the half circumference of the triangle.

Area of ​​triangle side a = (√3)a2/4

Semi-perimeter of triangle side a = 3a/2

According to the formula,

The radius of the circle = (√3)a22/ 4 / 3a/2 = a/2√3

Area of ​​circle = πr2 = πa2/ 12

Sample code

Real-time demonstration

#include <stdio.h>
int main(void) {
   int a = 5;
   float pie = 3.14;
   float area = (float)((pie*a*a)/12);
   printf("the area of circle inscribed in the triangle of side %d is %f",a,area);
   return 0;
}
Copy after login

Output

the area of circle inscribed in the triangle of side 5 is 6.541667
Copy after login

The above is the detailed content of What is the area of ​​a circle inscribed in an equilateral triangle?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template