Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Objects Loops and Final Touches Static Members

Izzatilla Karimov
Izzatilla Karimov
9,284 Points

Add a static method named CalculateHypotenuse to the RightTriangle class that returns the length of long side of a right

I am stuck at this challenge because Im not sure what to do.. Can someone please explain it?

1 Answer

Seth Kroger
Seth Kroger
56,412 Points

The formula being hinted at is the square root of the sum of the sides-squared, or hypotenuse = Math.sqrt(a*a +b*b); where a and b are the length of the two sides.