← Back to If Statements
Question 251
Triangle Kind By Sides
Triangle Kind By Sides
Read three side lengths and classify the triangle they make. When any two sides add up to no more than the third print Not a triangle; otherwise print Equilateral when all three sides are equal, Isosceles when exactly two are equal, and Scalene when none are. Input: three lines, each a positive integer, no prompts. Output: one line. Order the chain so the validity test comes first and the most specific shape before the less specific one.
Expected Output:
Not a triangle= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
If StatementsOperators
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.