Question: Q1: Problem Description: A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same
Q1: Problem Description: A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e. the polygon is both equilateral and equiangular). The formula for computing the area of a regular polygon is: Area =( n s)/(4 * tan(PI) Here, s is the length of a side, and n is the number of sides. Write a program that prompts the user to enter the number of sides (n) and their length (s) of a regular polygon and displays its area. Here is a sample run: Enter the number of sides (n): 5 Enter the length of a side (s): 6.5 The area of the polygon is: 72.69017017488385 Part 1: Requirements Specification The program must satisfy the following requirements: . It must ask the user to input n and s. It must calculate and print area. **Complete part 2. Note: You are not required to complete the Analysis and Design sections. Part 2: Coding Copy and Paste Source Code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
