Given here is an equilateral triangle of sidelength **a** which inscribes a square which in turn inscribes a reuleaux triangle. The task is to find the maximum possible area of this reuleaux triangle.

**Examples:**

Input : a = 5Output : 3.79335Input : a = 9Output : 12.2905

**Approach**: We know that the side of the square inscribed within an equilateral triangle of side length **x = 0.464*a** (Please refer here).

Also, in the reuleaux triangle, **h = x**.

So, Area of Reuleaux Triangle:

A= 0.70477*h^{2}= 0.70477*(0.464*a)^{2}

Below is the implementation of the above approach:

`// C++ Program to find the biggest Reuleaux triangle ` `// inscribed within in a square which in turn ` `// is inscribed within an equilateral triangle ` `#include <bits/stdc++.h> ` `using` `namespace` `std; `
` ` `// Function to find the biggest reuleaux triangle ` `float` `Area(` `float` `a) `
`{ ` ` ` ` ` `// side cannot be negative `
` ` `if` `(a < 0) `
` ` `return` `-1; `
` ` ` ` `// height of the reuleaux triangle `
` ` `float` `x = 0.464 * a; `
` ` ` ` `// area of the reuleaux triangle `
` ` `float` `A = 0.70477 * ` `pow` `(x, 2); `
` ` ` ` `return` `A; `
`} ` ` ` `// Driver code ` `int` `main() `
`{ ` ` ` `float` `a = 5; `
` ` `cout << Area(a) << endl; `
` ` ` ` `return` `0; `
`} ` |

*chevron_right*

*filter_none*

`// Java Program to find the biggest Reuleaux triangle ` `// inscribed within in a square which in turn ` `// is inscribed within an equilateral triangle ` ` ` `class` `GFG `
`{ ` ` ` `// Function to find the biggest reuleaux triangle ` `static` `float` `Area(` `float` `a) `
`{ ` ` ` ` ` `// side cannot be negative `
` ` `if` `(a < ` `0` `) `
` ` `return` `-` `1` `; `
` ` ` ` `// height of the reuleaux triangle `
` ` `float` `x = ` `0` `.464f * a; `
` ` ` ` `// area of the reuleaux triangle `
` ` `float` `A = ` `0` `.70477f * (` `float` `)Math.pow(x, ` `2` `); `
` ` ` ` `return` `A; `
`} ` ` ` `// Driver code ` `public` `static` `void` `main (String[] args) `
`{ ` ` ` `float` `a = ` `5` `; `
` ` `System.out.println(String.format(` `"%.5f"` `, Area(a))); `
`} ` `} ` ` ` `// This code is contributed by chandan_jnu ` |

*chevron_right*

*filter_none*

`# Python3 Program to find the biggest ` `# Reuleaux triangle inscribed within ` `# in a square which in turn is inscribed ` `# within an equilateral triangle ` `import` `math as mt `
` ` `# Function to find the biggest ` `# reuleaux triangle ` `def` `Area(a): `
` ` ` ` `# side cannot be negative `
` ` `if` `(a < ` `0` `): `
` ` `return` `-` `1`
` ` ` ` `# height of the reuleaux triangle `
` ` `x ` `=` `0.464` `*` `a `
` ` ` ` `# area of the reuleaux triangle `
` ` `A ` `=` `0.70477` `*` `pow` `(x, ` `2` `) `
` ` ` ` `return` `A `
` ` `# Driver code ` `a ` `=` `5`
`print` `(Area(a)) `
` ` `# This code is contributed by ` `# Mohit Kumar 29 ` |

*chevron_right*

*filter_none*

`// C# Program to find the biggest Reuleaux ` `// triangle inscribed within in a square ` `// which in turn is inscribed within an ` `// equilateral triangle ` `using` `System; `
` ` `class` `GFG `
`{ ` ` ` `// Function to find the biggest ` `// reuleaux triangle ` `static` `float` `Area(` `float` `a) `
`{ ` ` ` ` ` `// side cannot be negative `
` ` `if` `(a < 0) `
` ` `return` `-1; `
` ` ` ` `// height of the reuleaux triangle `
` ` `float` `x = 0.464f * a; `
` ` ` ` `// area of the reuleaux triangle `
` ` `float` `A = 0.70477f * (` `float` `)Math.Pow(x, 2); `
` ` ` ` `return` `A; `
`} ` ` ` `// Driver code ` `public` `static` `void` `Main () `
`{ ` ` ` `float` `a = 5; `
` ` `Console.WriteLine(String.Format(` `"{0,0:#.00000}"` `, `
` ` `Area(a))); `
`} ` `} ` ` ` `// This code is contributed by Akanksha Rai ` |

*chevron_right*

*filter_none*

`<?php ` `// PHP Program to find the biggest Reuleaux ` `// triangle inscribed within in a square ` `// which in turn is inscribed within an ` `// equilateral triangle ` ` ` `// Function to find the biggest ` `// reuleaux triangle ` `function` `Area(` `$a` `) `
`{ ` ` ` ` ` `// side cannot be negative `
` ` `if` `(` `$a` `< 0) `
` ` `return` `-1; `
` ` ` ` `// height of the reuleaux triangle `
` ` `$x` `= 0.464 * ` `$a` `; `
` ` ` ` `// area of the reuleaux triangle `
` ` `$A` `= 0.70477 * pow(` `$x` `, 2); `
` ` ` ` `return` `$A` `; `
`} ` ` ` `// Driver code ` `$a` `= 5; `
`echo` `Area(` `$a` `) . ` `"\n"` `; `
` ` `// This code is contributed ` `// by Akanksha Rai ` |

*chevron_right*

*filter_none*

**Output:**

3.79335

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within a hexagon
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle
- Biggest Square that can be inscribed within an Equilateral triangle
- Biggest Reuleaux Triangle within A Square
- Maximum count of Equilateral Triangles that can be formed within given Equilateral Triangle
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Largest hexagon that can be inscribed within an equilateral triangle
- Largest right circular cylinder that can be inscribed within a cone which is in turn inscribed within a cube
- Largest right circular cone that can be inscribed within a sphere which is inscribed within a cube
- Largest sphere that can be inscribed within a cube which is in turn inscribed within a right circular cone
- Largest ellipse that can be inscribed within a rectangle which in turn is inscribed within a semicircle
- Area of the biggest ellipse inscribed within a rectangle
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- Area of circle which is inscribed in equilateral triangle
- Count of distinct rectangles inscribed in an equilateral triangle
- Area of Equilateral triangle inscribed in a Circle of radius R

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.