# Area of circle which is inscribed in equilateral triangle

Given here is an equilateral triangle with side length a, the task is to find the area of the circle inscribed in that equilateral triangle.

**Examples:**

Input :a = 4Output :4.1887902047863905Input :a = 10Output :26.1799387799

**Approach:**

Area of equilateral triangle =

Semi perimeter of equilateral triangle =(a + a + a) / 2Radius of inscribed circle r = Area of equilateral triangle / Semi perimeter of equilateral triangle

=

=Area of circle = PI*(r*r) =

Below is the implementation of above approach:

## C++

`// C++ program to find the area ` `// of circle which is inscribed ` `// in equilateral triangle ` `# include<bits/stdc++.h> ` `# define PI 3.14 ` `using` `namespace` `std; ` ` ` `// Function retun the area of circle ` `// inscribed in equilateral triangle ` `float` `circle_inscribed(` `int` `a) ` `{ ` ` ` `return` `PI * (a * a) / 12; ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `int` `a = 4; ` ` ` ` ` `cout << circle_inscribed(a); ` ` ` `return` `0; ` `} ` ` ` `// This code is contributed ` `// by Mahadev99 ` |

*chevron_right*

*filter_none*

## Java

`// Java program to find the area ` `// of circle which is inscribed ` `// in equilateral triangle ` `import` `java.io.*; ` ` ` `class` `GFG ` `{ ` ` ` `static` `double` `PI = ` `3.14` `; ` ` ` `// Function retun the area of circle ` `// inscribed in equilateral triangle ` `static` `double` `circle_inscribed(` `int` `a) ` `{ ` ` ` `return` `PI * (a * a) / ` `12` `; ` `} ` ` ` `// Driver code ` `public` `static` `void` `main (String[] args) ` `{ ` ` ` `int` `a = ` `4` `; ` ` ` ` ` `System.out.println(circle_inscribed(a)); ` `} ` `} ` ` ` `// This code is contributed by anuj_67 ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 program to find the area of circle ` `# which is inscribed in equilateral triangle ` ` ` `# import math library for pi value ` `from` `math ` `import` `pi ` ` ` `# Function retun the area of circle ` `# inscribed in equilateral triangle ` `def` `circle_inscribed(a): ` ` ` `return` `pi` `*` `(a ` `*` `a) ` `/` `12` ` ` `# Driver code ` `a ` `=` `4` `print` `(circle_inscribed(a)) ` |

*chevron_right*

*filter_none*

## C#

`// C# program to find the area ` `// of circle which is inscribed ` `// in equilateral triangle ` `using` `System; ` ` ` `class` `GFG ` `{ ` `static` `double` `PI = 3.14; ` ` ` `// Function retun the area of circle ` `// inscribed in equilateral triangle ` `static` `double` `circle_inscribed(` `int` `a) ` `{ ` ` ` `return` `PI * (a * a) / 12; ` `} ` ` ` `// Driver code ` `public` `static` `void` `Main () ` `{ ` ` ` `int` `a = 4; ` ` ` ` ` `Console.WriteLine( circle_inscribed(a)); ` `} ` `} ` ` ` `// This code is contributed ` `// by inder_verma ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP program to find the area ` `// of circle which is inscribed ` `// in equilateral triangle ` ` ` `// Function retun the area of circle ` `// inscribed in equilateral triangle ` `function` `circle_inscribed(` `$a` `) ` `{ ` ` ` `return` `3.14 * (` `$a` `* ` `$a` `) / 12; ` `} ` ` ` `// Driver code ` `$a` `= 4; ` ` ` `echo` `circle_inscribed(` `$a` `); ` ` ` `// This code is contributed ` `// by Akanksha Rai(Abby_akku) ` |

*chevron_right*

*filter_none*

**Output:**

4.1887902047863905

## Recommended Posts:

- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Largest hexagon that can be inscribed within an equilateral triangle
- Biggest Square that can be inscribed within an Equilateral triangle
- Count of distinct rectangles inscribed in an equilateral triangle
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Area of a square inscribed in a circle which is inscribed in a hexagon
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Program to calculate area and perimeter of equilateral triangle
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Program to calculate the Area and Perimeter of Incircle of an Equilateral Triangle
- Area of decagon inscribed within the circle
- Area of circle inscribed within rhombus
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.