Prettier working version of the triangle calculator