# A formula for the exterior angles of an irregular polygon, given interior angles?

So I took a challenge from my Geometry teacher to create code that when the user gives the computer how many angles / sides a polygon has and the angle of each of the interior angles it could find each of the exterior angles whether it is regular or irregular. For example the user tells the computer they have a four-sided shape (quadrilateral), the interior angles are $70, 75, 110, 145$. The computer would then be able to output each corresponding angle in the proper order. My problem is that with coding you can't just type in the human logic so I need a formula to work from: what on earth would be a formula that could apply to any polygon with any number of sides (irregular or regular)?

At each vertex of the polygon, the interior angle and exterior angle must sum to $180$. You can use this to find the value of each exterior angle.