Problem 2022. Find a Pythagorean triple
Solution Stats
Problem Comments
-
12 Comments
I think for Test-7 , problem creator @Tanya should add "~" to the "flag_correct" part of the line:
assert(isequal(isTherePythagoreanTriple(a, b, c, d),flag_correct))
so it should be changed to :
assert(isequal(isTherePythagoreanTriple(a, b, c, d),~flag_correct))
Pythagorean triplets are taken as positive integers , one of the test case uses irrational number for inputs ! I wish the test creator
@Tanya Morton makes appropriate change as suggested by @Sophia
yeah took me a minute to figure out the rounding bit
Solution Comments
Show commentsProblem Recent Solvers4820
Suggested Problems
-
Maximum running product for a string of numbers
2213 Solvers
-
Find common elements in matrix rows
2680 Solvers
-
Increment a number, given its digits
667 Solvers
-
871 Solvers
-
933 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!