← all problems

hypotenuseLength 🌶️

Write a method that takes the lengths of the two legs of a right triangle, legA and legB, and returns the length of the hypotenuse. Use the square root and power methods from the Math class. Use your exam quick reference or the Javadocs to see what they do and how to call them!