UNI111 · Software Engineering
Triangle Classification Problem
Given three input values, a, b, and c representing the lengths of the sides of a triangle, classify the triangle as equilateral, isosceles, scalene, or invalid.
| Classification |
Condition |
| Equilateral |
(a=b=c), with positive sides |
| Isosceles |
Exactly two sides are equal, and the triangle is valid |
| Scalene |
All three sides are different, and the triangle is valid |
| Invalid |
The sides cannot form a triangle |