added a function to find all the A^2 + B^2 = C^2 in a given array