Objective
Three lengths form a triangle only if each side is smaller than the sum of the other two. If they do, it is classified by its sides.
Instructions
- Read three decimal lengths, one per line.
- If any is greater than or equal to the sum of the other two, show
Not a triangle. - Otherwise show
Equilateral(three equal sides),Isosceles(exactly two equal) orScalene(all different).
3
4
5
Scalene
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise