19. Type of Triangle
Core1000 ms256 MBSolved by 0%
Read three side lengths that are guaranteed to form a valid triangle, and print its type:
Equilateralif all three sides are equalIsoscelesif exactly two sides are equalScaleneif no two sides are equal
Constraints - `1 ≤ a, b, c ≤ 1000000` - The three sides always form a valid triangle.
Input
A single line containing three integers, the side lengths, separated by spaces.
Output
Print exactly one word: Equilateral, Isosceles or Scalene.
Input5 5 5
OutputEquilateral
Notehas three equal sides, and must not be reported as isosceles
Input5 5 8
OutputIsosceles
Notehas the equal pair first
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.