if i am given a number how i find other two members of pithagorean triplet efficiently please post a tutorial including this.thanks
if given numbers as 1 or 2 then there is no solution after that u can use the property of Pythagorian triplets :
if n is odd
b=(n^2-1)/2
c=(n^2n+1)/2
if n is even
b=(n^2)/4-1
c=(n^2)/4+1
if u can print any triplet which includes n.this should help.
1 Like