- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion

# Area of decagon inscribed within the circle in C Program?

A regular decagon is a ten sided polygon with all sides and angles equal. And here we need to find the area of a decagon that is inscribed inside a circle using the radius of the circle r,

Mathematical formula for the side of the decagon inscribed in the circle,

a = r√(2-2cos36^{o})

(Using cosine rules)

Formula for finding area of decagon,

Area = 5*a^{2}*(√5+2√5)/2 Area = 5 *(r√(2-2cos36))^^{2}*(√5+2√5)/2 Area = (5r^{2}*(3-√5)*(√5+2√5))/4

Using this formula in a program,

## Example

#include <stdio.h> #include <math.h> int main() { float r = 8; float area = (5 * pow(r, 2) * (3 - sqrt(5))* (sqrt(5) + (2 * sqrt(5))))/ 4; printf("area = %f",area); return 0; }

## Output

area = 409.968933

- Related Articles
- C Program for area of decagon inscribed within the circle?
- Area of circle inscribed within rhombus in C Program?
- Area of circle inscribed within rhombus?
- 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?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Swift Program to Calculate Area of Circle Inscribed in Square
- Area of largest Circle inscribed in N-sided Regular polygon in C Program?
- Area of largest triangle that can be inscribed within a rectangle in C Program?
- Find the area of largest circle inscribed in ellipse in C++
- 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?
- Program to calculate the area of an Circle inscribed in a Square
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle in C?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?

Advertisements