text: Program to find the Perimeter of a Regular Polygon | C # program to find the perimeter of a regular polygon ; Function to calculate the perimeter ; Calculate Perimeter ; Driver Code ; Get the number of sides ; Get the length of side ; find perimeter
code: using System ; class GFG { static double Perimeter ( double s , int n ) { double perimeter = 1 ; perimeter = n * s ; return perimeter ; } static public void Main ( ) { int n = 5 ; double s = 2.5 , peri ; peri = Perimeter ( s , n ) ; Console . WriteLine ( " Perimeter ▁ of ▁ Regular ▁ Polygon " + " ▁ with ▁ " + n + " ▁ sides ▁ of ▁ length ▁ " + s + " ▁ = ▁ " + peri ) ; } }