C program to find an area of pentagon.

 

01  #include<stdio.h>
02 #include<math.h>
03
04 int main()
05 {
06 int side;
07 float area;
08
09 printf("nEnter the Length of Side : ");
10 scanf("%d", &side);
11
12 area = (sqrt(5*(5+2*sqrt(5)))*side*side)/4;
13
14 printf("nArea of Regular Pentagon : %.2f", area);
15 return 0;
16 }
 
 OUTPUT :

Enter the Length of Side : 3
Area of Regular Pentagon : 15.48

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.