- Related Questions & Answers
- C Program for Tower of Hanoi
- C++ Program for Dijkstra’s shortest path algorithm?
- C/C++ Program for nth Catalan Number?
- C Program to Multiply two Floating Point Numbers?
- C program to find the length of a string?
- C Program to Check if all digits of a number divide it
- C Program to Check if a Given String is a Palindrome?
- Write a program to Delete a Tree in C programming
- Write a C program to print “ Tutorials Point ” without using a semicolon
- Surface Area and Volume of Hexagonal Prism in C programming
- Sum of the nodes of a Singly Linked List in C Program
- Sum of first n natural numbers in C Program
- C Program for simple interest?
- Area of a n-sided regular polygon with given Radius in C Program?
- Area of a leaf inside a square 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,

#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; }

area = 409.968933

Advertisements