Every triangle can be classified as either scalene, isosceles or equilateral:
(Some authors consider equilateral to be a special case of isosceles. For the purpose of this exercise, we use Euclid’s original definition and consider isosceles triangles those with exactly two edges of the same size.)
All triangles can also be classified as right, obtuse and accute:
Write a program that given three edge sizes determines:
Input consists of a several lines, each with three natural numbers x, y and z where
0 < x, y, z < 10 000
For each line of input, output should contain a line indicating both classifications or impossible
.
3 4 5
3 3 1
6 4 3
1 1 1
7 2 3
scalene right
isosceles acute
scalene obtuse
equilateral acute
impossible
try first: triangle1
try next: calc
Copyright © 2020-2021 Rudy Matela
All rights reserved