Function for the length of a hypotenuse.

I need help with this problem:

Write a function that will calculate the length of the hypotenuse of a right triangle. The function will take two real number parameters for the other two sides of the right triangle. The function will return the result it computes. Only write the function. you do not need to write main.

I have no idea what to do..
Do you know how to actually calculate the hypotenuse of a right triangle given the other two sides?
C++ already has that function, it's std::hypot() http://en.cppreference.com/w/cpp/numeric/math/hypot
Last edited on
Topic archived. No new replies allowed.