Answer
The number of sides in the polygon is $~5$
Work Step by Step
We can solve the equation as follows:
$\frac{n~(n-3)}{2} = D$
$\frac{n~(n-3)}{2} = n$
$n~(n-3) = 2n$
$n^2-3n = 2n$
$n^2-5n = 0$
$n~(n-5) = 0$
$n=0~~$or $~~n-5=0$
$n = 0~~$ or $~~n=5$
Since the number $n$ must be a positive number, $n=5$
The number of sides in the polygon is $~5$