- 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

# C Program for area of decagon inscribed within the circle?

Here we will see how to get the area of decagon which is present inside the circle. The radius is given. The side of the decagon is ‘a’.

As we know that the side of the decagon is like below −

So the area is −

## Example

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

## Output

Area : 409.969

- Related Questions & Answers
- Area of decagon inscribed within the circle in C Program?
- Area of circle inscribed within rhombus in C Program?
- Area of circle inscribed within rhombus?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Area of circle which is inscribed in equilateral triangle in C Program?
- Find the area of largest circle inscribed in ellipse in C++
- Program to calculate the area of an Circle inscribed in a Square
- Area of largest Circle inscribed in N-sided Regular polygon in C Program?
- C Program for Program to find the area of a circle?
- Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?
- Area of a circle inscribed in a regular hexagon?
- 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 a circle inscribed in a rectangle which is inscribed in a semicircle in C?
- Area of circle which is inscribed in an equilateral triangle?

Advertisements