Define a method Hypotenuse that calculates the length of the hypotenuse of a right triangle when the other two sides are given. The method should take two arguments of type Double and return the hypotenuse as a Double. Incorporate this method into a Windows application that reads integer values for side1and side2 from TextBoxes and performs the calculation with the Hypotenuse method. Determine the length of the hypotenuse for each of the following triangles:

 Triangle Side 1 Side 2

1 3.0 4.0

2 5.0 12.0

3 8.0 15.0

Votes + Comments
4 Years
Discussion Span
Last Post by Reverend Jim

First of all, that's not a question. Second of all, we don't do your homework for you. And lastly, read this first before posting questions. I see this is the second post in a row from you saying "do this for me".

You won't learn anything by getting others to do your work for you and you couldn't even be bothered to ask for help. You just posted the question, probably verbatim, from your assignment.

Edited by Reverend Jim

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.