- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?

Here we will see the area of a square which in inscribed in one circle and that circle is inscribed in an equilateral triangle. The side of the square is ‘a’. The radius of the circle is ‘r’, and the side of the hexagon is ‘A’. The diagram will be like below.

We know that the radius of a circle inscribed in a equilateral triangle is the inradius of the triangle. So the value is −

So the diagonal of the square is −

So the area of the square is −

## Example

#include <iostream> #include <cmath> using namespace std; float area(float A) { //A is the side of the triangle if (A < 0) //if the value is negative it is invalid return -1; float d = A / sqrt(3); float area = 0.5*d*d; return area; } int main() { float side = 10; cout << "Area is: " << area(side); }

## Output

Area is: 16.6667

- Related Articles
- Area of circle which is inscribed in an equilateral triangle?
- Area of circle which is inscribed in equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle in C?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle?
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse In C Program?
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?
- Program to calculate the area of an Circle inscribed in a Square
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle?
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse in C?
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle in C?
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within a hexagon in C?

Advertisements