Question: Design a solution and write its C++ code to compute the slope of the line between the two planar (2D) points (x1, y1) and (x2,
Design a solution and write its C++ code to compute the slope of the line between the two planar (2D) points (x1, y1) and (x2, y2).
Design a solution and write its C++ code to compute the slope of the line between the two planar (2D) points (x1, y1) and (x2, y2).
Hint: The line slope is computed as Y2-Y1x2-x1 . You should check to avoid the case when denominator is zero. Test your solution by using any suitable inputs.
Keep your code commented and indented for ease of reading. Paste your commented codes in the solution and also add a clear screen shot of outcome in your solution.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
