CJCoding With Joseph
15free / daySign inCreate account

Right Triangle Check

Three side lengths a, b and c are given in no particular order. They form a right triangle when the square of the longest side equals the sum of the squares of the other two. First use if statements to find the longest side (store it in a variable called longest) and the sum of the squares of the other two sides (in a variable called others), then print Right triangle or Not a right triangle.

Expected Output:

Right triangle

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.