Generating all Pythagorean triplets for given Hypotenuse can anybody help me out to find all  Pythagorean triplet when Hypotenuse is given?
for example 10 is given i need (10,6,8)  ,and not needed such triplet (10,24,26)
as 10 is not Hypotenuse for this triplet!

Euclid's formula generates all primitive triples, and this can be modified to give all triples: set $a = k\cdot(m^2 - n^2) ,\ \, b = k\cdot(2mn) ,\ \, c = k\cdot(m^2 + n^2)$, where $m, n$, and $k$ are positive integers with $m > n, m − n$ odd, and with $m$ and $n$ coprime. Then $a^2+b^2=c^2$, and $c$ is the given hypotenuse.
