There are nC2 ways to choose two vertices to join. Every diagonal
is formed by joining two vertices. The only ways to join two vertices
which will not determine a diagonal is to join two adjacent vertices,
which will form a side, not a diagonal. So we only need to subtract
the n sides from the nC2 ways to join two vertices and we get
diagonals. Since there are 12n diagonals we have this equation:
Clear of fractions by multiplying through by 2
Divide through by n, which is OK since n can't be 0.
The polygon has 27 sides.
Edwin