12. The diagram shows a square and a regular decagon that share an edge. One side of the square is extended to meet an extended edge of the decagon.
What is the value of $x$ ?

A 15
B 18
C 21
D 24
E 27
Solution
B
We consider the quadrilateral $P Q R S$ as shown in the figure on the right. Because $P Q R S$ is a quadrilateral its angles have total $360^{\circ}$.

Because it is the exterior angle of a decagon, $\angle R Q P=$ $\frac{1}{10} \times 360^{\circ}=36^{\circ}$.
It follows that the interior angle of a decagon is $(180-36)^{\circ}=144^{\circ}$. Hence the reflex angle $S R Q$ is $(360-144)^{\circ}=216^{\circ}$. The angle $P S R$ is an angle of the square and hence is $90^{\circ}$.

Therefore, we have
$$
x^{\circ}+36^{\circ}+216^{\circ}+90^{\circ}=360^{\circ} \text {. }
$$

It follows that
$$
x^{\circ}=(360-342)^{\circ}=18^{\circ} \text {. }
$$