working iterative implementation of get_pythagorean_triplet()