01 #include <stdio.h>

02

03 int main()

04 {

05 int side,perimeter;

06

07 float apothem; // min distance from center to egde

08

09 float area;

10

11 printf("Enter the value of side : ");

12 scanf("%d",&side);

13

14 printf("Enter the value of Apothem : ");

15 scanf("%f", &apothem);

16

17 perimeter=7*side;

18

19 area = (perimeter*apothem)/2;

20

21 printf("Area of the Regular Heptagon = %.2f n", area);

22 return 0;

23 }

OUTPUT :

Enter the value of side : 7

Enter the value of Apothem : 7.4

Area of the Regular Heptagon = 181.30