Menu
If we need to check if three given integers constitute a Pythagorean triple, we compute their squares and see if one of them is equal to the sum of the remaining two squares. Three integers constitute a Pythagorean triple if they are the sides of a right triangle: c is the hypotenuse (the longest side of the triangle), while a and b are the other two sides, called legs. If you have already learned about the Pythagorean theorem, you surely recognize this formula. The Pythagorean triple definition says it is a set of three positive integers a, b, c that satisfy the relationship:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |