Given a, b, c
the length of the three sides of a triangle, say if the triangle is right-angled (i.e. has one angle equal to 90 degrees) or not.
Input
Three positive integer values in any order
Output
Either a specific true output (true
, 1
, yes
, ...) or a specific false output (false
, 0
, no
, ...)
Example
5, 3, 4 --> yes
3, 5, 4 --> yes
12, 37, 35 --> yes
21, 38, 50 --> no
210, 308, 250 --> no
Rules
- The input and output can be given in any convenient format.
- In your submission, please state the true and the false values.
- No need to handle negative values or invalid edge triple
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- If possible, please include a link to an online testing environment so other people can try out your code!
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
21, 38, 5
, because 21 + 5 < 38. Is this an intentional pathological case that we have to handle? \$\endgroup\$