- 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

# Area of largest Circle inscribed in N-sided Regular polygon in C Program?

An n-sided regular polygon inscribed in a circle, the radius of this circle is given by the formula,

r = a/(2*tan(180/n))

Suppose a polygon have 6 faces i.e., a hexagon and as we know mathematically that the angle is 30 degree

So the radius of circle will be (a / (2*tan(30)))

Therefore, r = a√3/2

We see the polygon can be divided into N equal triangles. Looking into one of the triangles, we see that the whole angle at the center can be divided into = 360/N

So, angle x = 180/n Now, tan(x) = (a / 2) * r So, r = a / ( 2 * tan(x)) So, Area of the Inscribed Circle is, A = Πr2 = Π * (a / (2 * tan(x))) * (a / (2*tan(x)))

## Example

#include <iostream> using namespace std; int main() { float area; float n = 6; float a = 4; float r = a / (2 * tan((180 / n) * 3.14159 / 180)); area = (3.14) * (r) * (r); cout <<”area = ”<<area<< endl; return 0; }

## Output

area = 37.6801

- Related Questions & Answers
- Area of largest Circle inscribe in N-sided Regular polygon in C Program?
- Area of a n-sided regular polygon with given Radius in C Program?
- Area of a n-sided regular polygon with given Radius?
- Area of a n-sided regular polygon with given side length in C++
- Apothem of a n-sided regular polygon in C++
- Find the area of largest circle inscribed in ellipse in C++
- Area of a circle inscribed in a regular hexagon?
- Area of circle inscribed within rhombus in C Program?
- Determine the position of the third person on regular N sided polygon in C++ Program
- Area of decagon inscribed within the circle in C Program?
- Determine the position of the third person on regular N sided polygon in C++?
- C Program for area of decagon inscribed within the circle?
- Area of circle inscribed within rhombus?
- Area of circle which is inscribed in equilateral triangle in C Program?
- Find number of diagonals in n sided convex polygon in C++

Advertisements