
November 16th, 2004, 03:38 PM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 6
Time spent in forums: 1 h 8 m 30 sec
Reputation Power: 0
|
|
|
Nested For Loops
Can somebody help me with this...I have to use nested for loops
A right triangle can have sides whose lengths are all integers. The set of three integer values for the lengths of the sides of a right triangle is called a "Pythagorean triple." The lengths of the three sides must satisfy the relationship that the sum of the squares of two smaller sides is equal to the square of the hypotenuse. Write an application to find all Pythagorean triples for side1, side2, and hypotenuse, and no larger than 500. Use a triple nested for loop that tries all possibilities.
thnx
|