Did I set this problem up correctly and/or how do I solve it? (Angles of polygons)

[tex]\bf \textit{sum of all interior angles in a polygon}\\\\ n\theta =180(n-2)~~ \begin{cases} n=sides'~number\\ \theta =angle~in\\ \qquad degrees\\ \cline{1-1} \theta =140 \end{cases}\implies n140=180(n-2) \\\\\\ 140n=180n-360\implies 140n+360=180n\implies 360=40n \\\\\\ \cfrac{360}{40}=n\implies 9=n[/tex]