In this exercise, you will modify the hypotenuse program shown earlier in Figure 9-6.Follow the instructions for

Question:

In this exercise, you will modify the hypotenuse program shown earlier in Figure 9-6.Follow the instructions for starting C++ and viewing the ModifyThis13.cpp file, which is contained in either the Cpp8\Chap09\ModifyThis13 Project folder or the Cpp8\Chap09 folder. (Depending on your C++ development tool, you may need to open this exercise’s project/solution file first.) Remove both calculation tasks from the main function, and assign both to a program-defined value-returning function named getHypotenuse. Test the program appropriately.

1 //Hypotenuse.cpp - displays the length of a right 2 //triangle's hypotenuse 3 //Created/revised by  on  4 5 #include  6 #include  7 #include - 8 using namespace std; required for the pow and sqrt functions 9 10 int main() 11 { double sidea double sideb =

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: