- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

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

Here we will see the area of largest triangle which is inscribed in regular hexagon. Each side of the hexagon is ‘a’, and each side of the triangle is ‘b’.

From this diagram we can see that if we make one triangle using one side of hexagon, then these two triangles are making each sides into two parts. We can see two right angled triangles also. From the Pythagorus formula, we can say that −

So the area is −

#include <iostream> #include <cmath> using namespace std; float area(float a) { if (a < 0 ) //if value is negative it is invalid return -1; float area = (3 * sqrt(3) * pow(a, 2)) / 4; return area; } int main() { float a = 6; cout << "Area : " << area(a); }

Area : 46.7654

- Related Questions & Answers
- C++ program to find the Area of the Largest Triangle inscribed in a Hexagon?
- Area of a circle inscribed in a regular hexagon?
- Area of the largest triangle that can be inscribed within a rectangle?
- Area of largest triangle that can be inscribed within a rectangle 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 which is inscribed within a hexagon 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 which is inscribed within a hexagon?
- Find the area of largest circle inscribed in ellipse in C++
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse?
- Largest Triangle Area in Python
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse In C Program?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of circle which is inscribed in equilateral triangle in C Program?

Advertisements