## 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! While you're at it, check out some resources Treehouse students have shared here.

### 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.

# Add a static method named CalculateHypotenuse to the RightTriangle class

I've tried two different ways of calculating the hypotenuse and both ways, I get the error: "Bummer! Is your math correct?"

Am I calculating it wrong?

RightTriangle.cs
```namespace Treehouse.CodeChallenges
{
class RightTriangle
{
public static double CalculateHypotenuse (double side1, double side2)
{
return System.Math.Pow(side1, 2) + System.Math.Pow(side2, 2);
//return (side1 * side1) + (side2 * side2);
}
}
}
```

STAFF

Your code is great! Your math is a little off. Let's take a triangle with the sides 3, 4, 5. The formula is a^2 + b^2 = c^2. So 9 + 16 = 25. So if we want to solve for the hypotenuse we take the squares of both sides and add them, which you did perfectly. But then we take the square root of the result.

```namespace Treehouse.CodeChallenges
{
class RightTriangle
{
public static double CalculateHypotenuse (double side1, double side2)
{
return System.Math.Sqrt(System.Math.Pow(side1, 2) + System.Math.Pow(side2, 2));
//return (side1 * side1) + (side2 * side2);
}
}
}
```

You are just missing one tiny math function. Hope this helps!

Can somebody help me with my code? I read the answer already, but I didn't just want to copy-paste. Would my code ever work as it's been written (with some kind of get modification?) Thanks!

```namespace Treehouse.CodeChallenges
{
class RightTriangle
{
private static double CalculateHypotenuse
{
double a = x;
Console.WriteLine("Insert the length of a:");
double b = y;
Console.WriteLine("Insert the length of b:");