- 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 Hexagon is a closed figure of 6 side and a regular hexagon is the one which has all six sides equal and angle equal. For finding the area of hexagon, we are given only the length of its diagonal i.e d.

The interior angles of Hexagon are of 120 degrees each and the sum of all angles of a Hexagon is 720 degrees.

The formula to find the area of hexagon with side length a,

Area = (3a^{2}√3) / 2.

Since all sides are of same size and angle is 120 degrees,

d = 2a or a = d/2

By putting the value of a in the form of d we get area in terms of d,

2 √3 ) / 8

#include <stdio.h> #include<math.h> int main() { float d = 10; float area = (3 * sqrt(3) * pow(d, 2)) / 8; printf("Area of hexagon = %f",area); return 0; }

Area of hexagon = 64.951904

Advertisements