C++ program to calculate the area of hexagon


 #include<iostream.h>

#include<conio.h>

#include<math.h>

int main()

{

int a;

float A;

cout<<"enter the side:";

cin>>a;

A=3*(pow(3,0.5)/2)*a*a;

cout<<"Area is:"<<A;

getch();

return 0;

}

To Run:


















Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com