Question: 3.1 (Geometry: area of a pentagon) Write a program that prompts the user to enter the length from the center of a pentagon to a

3.1 (Geometry: area of a pentagon) Write a program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of the pen- tagon, as shown in the following figure. The formula for computing the area of a pentagon is Area = 3V3 2 -s, where's is the length of a side. The side can be computed using the formula s = 2r sin- where r is the length from the center of a pentagon to a vertex. Here is a sample run: Enter the length from the center to a vertex: 5. 5 Enter The area of the pentagon is 108.61 *3.3 (Geography: estimate areas) Find the GPS locations for Atlanta, Georgia; Orlando, Florida; Savannah, Georgia; and Charlotte, North Carolina from www.gps-data-team.com/map/ and compute the estimated area enclosed by these four cities. (Hint: Use the formula in Programming Exercise 3.2 to compute the distance between two cities. Divide the polygon into two triangles and use the for- mula in Programming Exercise 2.14 to compute the area of a triangle.) *3.5 (Geometry: area of a regular polygon) 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 X $2 4 X tan Here, s is the length of a side. Write a program that prompts the user to enter the number of sides and their length of a regular polygon and displays its area. Here is a sample run: Enter the number of sides: 5 -Freer Enter the side: 6.5 -Enter The area of the polygon is 73. 69017017488385
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
