You are viewing a single comment's thread. Return to all comments →
SELECT CASE WHEN A + B + C <= 2 * GREATEST(A, B, C) THEN 'Not A Triangle' WHEN A = B AND B = C THEN 'Equilateral' WHEN A = B OR A = C OR B = C THEN 'Isosceles' ELSE 'Scalene' END FROM triangles;
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Type of Triangle
You are viewing a single comment's thread. Return to all comments →