Skip to content

Implement a solver for the hypotenuse of the pythagorean theorem

Notifications You must be signed in to change notification settings

suny-poly-cs-club/PythagoreanTheorem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pythagorean Theorem

The Pythagorean Theorem is an equation developed by Pythagoras to calculate the lengths of the sides of a right triangle.

The equation is

a2 + b2 = c2

where a and b are the lengths of the sides, and c is the length of the hypotenuse.

For this exercise, implement methods for finding the hypotenuse of a right triangle, given two sides, and a side of a triangle, given the other side and the hypotenuse. In other words, find c given a and b, and find a, given b and c.

Also, implement the verify method to check that the given a, b, and c are a solution to the equation.

Hint: Java has a Math class which includes sqrt() and pow() methods.

About

Implement a solver for the hypotenuse of the pythagorean theorem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published