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.)
Write a program that given three edge sizes determines whether a triangle is scalene, isosceles, equilateral or impossible.
The input consists of a single line with three natural numbers x, y and z where 0 < x, y, z < 100
The output should contain a single line with just
3 4 5
3 3 1
6 2 3
4 4 4
If are having trouble to get a full score in this exercise, try to come up with other test cases besides the ones given on the example inputs. Does your program still produce the expected results on them? What if you change the order in which the sides are given?
try next: factorial1
Copyright © 2020-2023 Rudy Matela