Given here is a regular decagon, inscribed within a circle of radius r, the task is to find the area of the decagon.
Input: r = 5 Output: 160.144 Input: r = 8 Output: 409.969
We know, side of the decagon within the circle, a = r√(2-2cos36)(Refer here)
So, area of the decagon,
A = 5*a^2*(√5+2√5)/2 = 5 *(r√(2-2cos36))^2*(√5+2√5)/2=(5*r^2*(3-√5)*(√5+2√5))/4
Below is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Area of a square inscribed in a circle which is 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 the circle that has a square and a circle inscribed in it
- Area of circle inscribed within rhombus
- Area of circle inscribed in a Isosceles Trapezoid
- Area of circle which is inscribed in equilateral triangle
- Area of a circle inscribed in a regular hexagon
- Area of largest Circle that can be inscribed in a SemiCircle
- Program to calculate area of an Circle inscribed in a Square
- Find the area of largest circle inscribed in ellipse
- Area of Equilateral triangle inscribed in a Circle of radius R
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- The biggest possible circle that can be inscribed in a rectangle
- Radius of the inscribed circle within three tangent circles
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
- Area of largest triangle that can be inscribed within a rectangle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.