![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Program to calculate area of Enneagon
An enneagon also known as nonagon is a polygon with 9 sides. To calculate the area of enneagon the following formula is used,
Area of ennagon = ((a2*9) / 4*tan (20°)) ∼= (6.18 * a2)
Code Logic, The area of a polygon with nine sides is calculated by using the formula, ((a2*9) / 4*tan (20°)) ∼= (6.18 * a2). The value 6.18 is filled into a float variable called multiplier, this value then multiplied by the square of side of enneagon.
Example
#include <stdio.h> #include <math.h> int main(){ int a = 6; float area; float multiplier = 6.18; printf("Program to find area of Enneagon
"); printf("The side of the Enneagon is %d
", a); area = (6.18 * a * a); printf("The area of Enneagon is %f
", area); return 0; }
Output
Program to find area of Enneagon The side of the Enneagon is 6 The area of Enneagon is 222.479996
Advertisements