Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Convex Polygons Your objective in this assignment is to write a program to compu

ID: 3749038 • Letter: C

Question

Convex Polygons Your objective in this assignment is to write a program to compute the circumference and area of an arbitrary convex polygon with three or more sides. Specifically, your program should do the following 1. Accept from the keyboard the definition of a polygon. The polygon is entered, one vertex at a time with each vertex defined as a point in Cartesian coordinates (x, y). See the sample run below. 2. Display the polygon definition as a table of (x, y) points. 3. Display the circumference of the polygon. 4. Display the area of the entire polygon, as well as the area of each of the polygon's component triangles. Note that for a polygon having "n sides, the area is the sum of the areas of "n-2" triangles as shown in the figure below The area of each triangle may be computed from the formula: adh d c re the sides of the triangle. a+b+ c AS-(-s -b-(s-o where sbt of the 3 (xi, yi) Ai (o yo)s Az Aj As (xs, ys) ENTER A POLYGON DEFINITION: Enter next point: 0 70 Enter next point: 50 90 Enter next point: 80 80 Enter next point: 90 40 Enter next point: 60 10 S Enter next point: 10 20 A Enter next point: -1 A negative x coordinate terminates Here is the polygon definition: P (o, 70) L (50, 90) (80, 80) (90, 40) (60, 10) R (10, 20) circumference 271.112 NI Polygon Area 5200 Triangle 1: Area 550 Triangle 2: Area 1650 Triangle 3: Area 1800 Triangle 4: Area 1200 8/22/2018-gpe Page 1/4

Explanation / Answer

here is the link to the solution of your question

https://ide.codingblocks.com/#/s/27227

the question has been solved in a lucid way with the help of loops and functions hope it helps