Practice · 2 of 4
Triangle classification
CHALLENGE
Difficulty: beginner+25 XP
Implement String triangleType(int a, int b, int c): "equilateral" when all three sides equal, "isosceles" when exactly two equal, "scalene" when none equal. (Assume the sides form a valid triangle.)
Press Submit to check your solution.
Back to lesson: Practice: Branch and bound