Question: C Language . Problem: The user of your program will indicate whether (1) a regular polygon is inscribed inside of a circle or (2) the
C Language

. Problem: The user of your program will indicate whether (1) a regular polygon is inscribed inside of a circle or (2) the circle is inscribed inside of a regular polygon. The number of sides and the apothem will follow as additional input. Calculate and display both the radius and area of the circle, and the side length and area of the regular polygon. Requirements of your solution: The only functions from math.h that can be used are sqrt, pow, and the trigonometric functions. Any use of logical operators, relational operators, bool variables, or selection constructs is prohibited. A violation of either of the above will result in your assignment being awarded no points. The technique necessary to solve this problem with the given requirements is similar to that used in the final two examples of chapter 3. Example Execution #1: Example Execution #4: 1. Polygon inside of circle 1. Polygon inside of circle 2. Circle inside of polygon 2. Circle inside of polygon Select your option -> 1 Select your option -> 1 Enter number of polygon sides -> 6 Enter number of polygon sides -> 5 Enter length of polygon apothem -> 9 Enter length of polygon apothem -> 55.71 Circle Radius: Circle Area: Polygon Side Length: Polygon Area: 10.39 678.58 10.39 280.59 Circle Radius: Circle Area: Polygon Side Length: Polygon Area: 68.86 29794.14 80.95 11274.50 -=-=
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
