text: Area of a Hexagon | CPP program to find area of a Hexagon ; function for calculating area of the hexagon . ; Driver Code ; Length of a side
code: #include <iostream> NEW_LINE #include <math.h> NEW_LINE using namespace std ; double hexagonArea ( double s ) { return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 ) ; } int main ( ) { double s = 4 ; cout << " Area ▁ : ▁ " << hexagonArea ( s ) ; return 0 ; }