Question: you will take in two points in the xy-plane from a user: call those points (x1, y1) and (x2, y2). Recall that if a line
you will take in two points in the xy-plane from a user: call those points (x1, y1) and (x2, y2). Recall that if a line is vertical, its equation is of the form x = a for some real number a. Non-vertical lines have the form y = mx + b where m is the slope of the line, and b is the y-intercept. Recall further that (for non-vertical lines), the slope of a line is given by m = y2 − y1 / x2 − x1 . Your program should output the equation of the line through the user’s points, and then output whether it’s horizontal, vertical, increasing, or decreasing
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
To find the equation of the line through the two points we will use the slopeintercept form y mx b where m is the slope of the line and b is the yinte... View full answer
Get step-by-step solutions from verified subject matter experts
