Pythagoras Theorem states that the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. Wikipedia
if c denotes the length of the hypotenuse and a and b denote the lengths of the other two sides, the Pythagorean theorem can be expressed as the Pythagorean equation:
a^2 + b^2 = c^2
Now in below example we are trying to implement a C# program for Pythagoras Theorem.
The Pythagorean theorem takes its name from the ancient Greek mathematician Pythagoras (569 B.C.?-500 B.C.?), who was perhaps the first to offer a proof of the theorem. But people had noticed the special relationship between the sides of a right triangle long before Pythagoras. Ancient clay tablets from Babylonia indicate that the Babylonians in the second millennium B.C., 1000 years before Pythagoras, had rules for generating Pythagorean triples, understood the relationship between the sides of a right triangle, and, in solving for the hypotenuse of an isosceles right triangle, came up with an approximation of accurate to five decimal places. Source.