Simple program to solve right triangles