Given an array of 3 integers a, b and c
, determine if they form a pythagorean triple.
A pythagorean triple is formed when:
c2 = a2 + b2
where c
is the largest value of a, b, c
.
For example: a = 3, b = 4, c = 5
forms a pythagorean triple, because
52 = 32 + 42
1
ifa
,b
andc
form a pythagorean triple0
ifa
,b
andc
do not form a pythagorean triple- For Python: return
True
orFalse