Computer Science, asked by sakshi409, 1 year ago

write a program that inputs the number of sites of polygon and then determined whether it is hexagon, a Pentagon, a rectangle, or a triangle.

Answers

Answered by himanshusingh52
0
We will learn how to find the sum of the interior angles of a polygon having n sides.

We know that if a polygon has ‘n’ sides, then it is divided into (n – 2) triangles. 

We also know that, the sum of the angles of a triangle = 180°.

Therefore, the sum of the angles of (n – 2) triangles = 180 × (n – 2)

                                                                            = 2 right angles × (n – 2)

                                                                            = 2(n – 2) right angles

                                                                            = (2n – 4) right angles

Therefore, the sum of interior angles of a polygon having n sides is (2n – 4) right angles.

Thus, each interior angle of the polygon = (2n – 4)/n right angles.

Now we will learn how to find the find the sum of interior angles of different polygons using the formula.

Name

Figure

Number of Sides

Sum of interior angles (2n - 4) right angles

Triangle



3

(2n - 4) right angles

= (2 × 3 - 4) × 90°

= (6 - 4) × 90°

= 2 × 90°

= 180°

Quadrilateral



4

(2n - 4) right angles

= (2 × 4 - 4) × 90°

= (8 - 4) × 90°

= 4 × 90°

= 360°

Pentagon



5

(2n - 4) right angles

= (2 × 5 - 4) × 90°

= (10 - 4) × 90°

= 6 × 90°

= 540°

Hexagon



6

(2n - 4) right angles

= (2 × 6 - 4) × 90°

= (12 - 4) × 90°

= 8 × 90°

= 720°

Heptagon



7

(2n - 4) right angles

= (2 × 7 - 4) × 90°

= (14 - 4) × 90°

= 10 × 90°

= 900°

Octagon



8

(2n - 4) right angles

= (2 × 8 - 4) × 90°

= (16 - 4) × 90°

= 12 × 90°

= 1080°


1lovelysweety: You??
1lovelysweety: By the way can I ask you a question......
1lovelysweety: Do you have any crush.....shall I be your friends
1lovelysweety: Friend
1lovelysweety: Hey what happens... reply na
himanshusingh52: I m Himanshu claaa9 from Delhi
himanshusingh52: Yes you are best friend
1lovelysweety: Hey plz na tell me about your crush??
himanshusingh52: Nhi ha
himanshusingh52: Ap ka boy friend ha
Similar questions