A right triangle can have sides that are all integers. The set of three integer values for
Fantastic news! We've Found the answer you've been seeking!
Question:
A right triangle can have sides that are all integers. The set of three integer values for the sides of a right triangle is called a Pythagorean triple. These three sides must satisfy the relationship that the sum of the squares of two of the sides is equal to the square of the hypotenuse. Find all Pythagorean triples for side1, side2, and the hypotenuse all no larger than 500. Use a triple-nested for loop that simply tries all possibilities.
Related Book For
Posted Date: