Program to calculate area of Enneagon

An enneagon (also known as nonagon) is a polygon with 9 sides. To calculate the area of an enneagon, we use a specific mathematical formula based on the side length.

Syntax

Area = (a² × 9) / (4 × tan(20°))
Area ? 6.1818 × a²

Where a is the length of each side of the enneagon.

a Enneagon (9 sides)

Example

The following program calculates the area of an enneagon using the mathematical formula −

#include <stdio.h>
#include <math.h>

int main() {
    float side = 6.0;
    float area;
    float multiplier = 6.1818;
    
    printf("Program to find area of Enneagon
"); printf("The side of the Enneagon is %.1f
", side); area = multiplier * side * side; printf("The area of Enneagon is %.2f
", area); return 0; }
Program to find area of Enneagon
The side of the Enneagon is 6.0
The area of Enneagon is 222.65

Key Points

  • The multiplier 6.1818 is derived from the formula (9) / (4 × tan(20°))
  • The angle 20° comes from dividing 180° by 9 (the number of sides)
  • This formula works for any regular enneagon where all sides are equal

Conclusion

Calculating the area of an enneagon is straightforward using the formula 6.1818 × a². This approach provides accurate results for any regular nine-sided polygon.

Updated on: 2026-03-15T10:47:10+05:30

200 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements