C# program For Pythagoras Theorem.

Pythagoras Theorem

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.

Source Code:


C# program For Pythagoras Theorem
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.


6 thoughts on “C# program For Pythagoras Theorem.”

  1. Thank you for this pythagoras formula. I was struggling to understand & develop it in a console app. Also your web site is very cool. I’m impressed by the details that you have on this website. It reveals how nicely you understand this C# programming. You, my pal, ROCK!

  2. Hi this website is really informative. I’ll be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!

Comments are closed.