Given the number of sides ‘n’ and the length of side ‘s’ of a regular polygon, the task is to find out the Perimeter of this polygon.
Input: n = 7, s = 10 Output: Perimeter : 70 Since the sides are 7, Hence the given polygon is Heptagon. Therefore. Perimeter = 7*10 = 70 Input: n = 5, s = 2.5 Output: Perimeter : 12.5 Since the sides are 5, Hence the given polygon is Pentagon. Therefore. Perimeter = 5*2.5 = 12.5
Approach: In geometry, a regular polygon is a closed figure with all sides eqial. It is a two-dimensional figure.
Perimeter of a Regular Polygon = Number of sides * Length of each side
Below is the implementation of the above approach:
Perimeter of Regular Polygon with 5 sides of length 2.500000 = 12.500000
- Program to find the Circumcircle of any regular polygon
- Program to find the Interior and Exterior Angle of a Regular Polygon
- Program to find Area of Triangle inscribed in N-sided Regular Polygon
- C Program for Find the perimeter of a cylinder
- Java Program for Find the perimeter of a cylinder
- Program to find the Area and Perimeter of a Semicircle
- Python Program for Find the perimeter of a cylinder
- Apothem of a n-sided regular polygon
- Program to find Perimeter / Circumference of Square and Rectangle
- Check whether two convex regular polygon have same center or not
- Regular polygon using only 1s in a binary numbered circle
- Area of a n-sided regular polygon with given Radius
- Length of Diagonal of a n-sided regular polygon
- Angle between 3 given vertices in a n-sided regular polygon
- Side of a regular n-sided polygon circumscribed in a circle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.