Logo 
Search:

C Programming Forum

Ask Question   UnAnswered
Home » Forum » C Programming       RSS Feeds

calculating area of a regular polygon

  Asked By: Kwemoi    Date: Nov 26    Category: C Programming    Views: 889
  

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.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on calculating area of a regular polygon Or get search suggestion and latest updates.




Tagged: