accept three numbers and check whether they are pthagorean triplets or not. display the message accordingly
Answers
Answered by
8
Answer:
A Pythagorean triplets consists of three positive integers a, b, and c, such that a2 + b2 = c2. Such a triple is commonly written (a, b, c), and a well-known example is (3, 4, 5). If (a, b, c) is a Pythagorean triple, then so is (ka, kb, kc) for any positive integer k. A primitive Pythagorean triple is one in which a, b and c are coprime (that is, they have no common divisor larger than 1). A triangle whose sides form a Pythagorean triple is called a Pythagorean triangle, and is necessarily a right triangle.
3, 4, 5 is an example of Pythagorean triplets.
Similar questions