Is there any way to generate all pythagorean triples given its hypotenuse other that brute force ??
ex: given 25 as hypotenuse
ans :
7,24,25
15 20 25
Thank u !!
Is there any way to generate all pythagorean triples given its hypotenuse other that brute force ??
ex: given 25 as hypotenuse
ans :
7,24,25
15 20 25
Thank u !!
Formulas for generating Pythagorean triples - Wikipedia, the free encyclopedia
Sure all 12 ways might not apply... but it's a start. Hint: Take a look at number 10 (X).
Last edited by zacs7; 10-01-2009 at 07:42 PM.
Using III i can only get the starting primitive triple .
unfortunately rest all dont apply (and or ) are difficult to code
Thank you for your reply !
The thing is c can be very large ~ 10^18 !
so cant brute force all of it !