posted 3 years ago

Hello guys, I just wanna code for the following query

The Pythagorean Theorem holds that the length of the hypotenuse (z) of a right triangle with sides x and y is given by the following formula:

x2 + y2 = z 2

As it turns out, there are an infinite number of triangles in which all three of these edge lengths are integers, including the following examples:

3*2 + 4*2 = 5*2

12*2 + 5*2 = 13*2

Thanks in advance.

The Pythagorean Theorem holds that the length of the hypotenuse (z) of a right triangle with sides x and y is given by the following formula:

x2 + y2 = z 2

As it turns out, there are an infinite number of triangles in which all three of these edge lengths are integers, including the following examples:

3*2 + 4*2 = 5*2

12*2 + 5*2 = 13*2

Thanks in advance.

posted 3 years ago

The first steps are always the same. try and figure out how YOU would solve it, with paper and pencil. Don't even consider writing a line of code until you can solve it yourself.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors