Write a c program which calculates the area of a regular polygon.
[Hint: Area = (a x p)/2, where a=(s/2) x cot(1800/n) and p=(s x n)]
(a is the length of the apothem, p is the perimeter of the polygon, s is the length of each side of polygon, n is the no of sides)
NB:
• Apothem is the line segment from the center of a regular polygon to the midpoint of a side.
• Apothem and perimeter should be in separate functions.