Question: I need help with this c++ program!!! The Pythagorean equation, a2 + b2 = c2, states the square of the hypotenuse (the side opposite the

I need help with this c++ program!!!

I need help with this c++ program!!! The Pythagorean equation, a2 +b2 = c2, states the square of the hypotenuse (the side opposite

The Pythagorean equation, a2 + b2 = c2, states the square of the hypotenuse (the side opposite the right angle), c, is equal to the sum of the squares of the other two sides, a and b Develop a program to read from an input file, which contains a collection of right triangles' a and b values and compute length of the hypotenuse for each. For this lab assignment, you may use the built-in C square root function #include float sqrt (float x); Your program should have three source files: RightTriangle.h (given below), RightTriangle.cpp, and lab02p2.cpp. It should be able to process any number of right triangles in the input data file. Your program will use the right triangle declaration below for store and compute the hypotenuse Right triangle class declaration #ifndef RIGHT TRIANGLE H ide fine RIGHT TRIANGLE H class RightTrianglei public: RightTriangle (float a, float b); float getHypotenuse(); /* computes the hypotenuse private: float a; float b; #endif /* RIGHT TRIANGLE H / You can use the sample input file, /user/thuang/cs256/right.dat, to test your program $ cat /user/thuang/cs256/right.dat 3.0 4.0 34.5 24.8 9.0 12.0 56.99 4.78 256.7 512.5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!