I came across this recreational question randomly; somehow so far I still cannot see any useful results or connections for this problem of finding out how many right triangles can be made using the vertices of a regular $10$-gon. I'd love to know if anyone has an elegant way to solve it.
You use the inscribed angle theorem, on the circumscribed circle. Given a right triangle constructed the angle between the center and the other two vertices must be double right (ie the other two vertices must be opposite).
This makes that we construct right triangles by using any of the $10$ vertices, its opposite and any of the remaining 8 vertices. This means we can select the first two in $5$ ways (since the order does not matter) and the last in $8$ ways giving $40$ possibilities.
The most elegant way to solve this may be skyking's method: first find the hypotenuse, then the right-angled vertex.
Another way (not as elegant, I think) is to select the right-angled vertex first, then the other two.
For a given vertex $A$ of the $10$-gon, you can try putting another vertex at the adjacent vertex $B$ in the clockwise direction around the $10$-gon, then find a third vertex $C$ of the $10$-gon such that the triangle $\triangle ABC$ has a right angle at $A.$
Next you can try putting vertex $B$ at the second vertex from $A$ in the clockwise direction around the $10$-gon. Again you can find a vertex $C$ that produces a right angle at $A.$
You can do this just two more times without repeating any triangles. That is, there are $4$ possible right triangles that can be formed with the right angle at the given vertex $A.$ Since there were originally $10$ choices for $A,$ you have $10 \times 4 = 40$ possible right triangles altogether.