A traingle has 3 sides with 180 degress.

To get the "pattern" you need to Mathematically understand it.

A Quadrilateral has 4 sides with 360 degrees.

But a Quadrilateral may be divided into 2 triangles.

A triangle is 180 degress; 2 triangles are 360 degrees.

A pentagon has 5 sides with 540 degrees

But it can be formulated into 3 triangles.

3 x 180 = 540

Looking at the pattern, 3 sides is formulated into 1 traingle. 4 sides but can be formulated into 2 traingles. 5 sides but can be formulated into 3 traingles.

3 - 1 = 2

4 - 2 = 2

5 - 3 = 2

Plus multiplying each by 180, will give the proper sum of all interior angles, depending on the number of sides.

So, the formula is (n-2) 180 degrees.

Note: Use n as the number of sides of the polygon..

So a 10 sided polygon will have 1440 degrees.