Problem 4) Let I be a line in the x-y plane. If I is a vertical line, its equation is x 5a for some real number a. Suppo
Posted: Fri Jul 01, 2022 5:34 am
Problem 4) Let I be a line in the x-y plane. If I is a vertical line, its equation is x 5a for some real number a. Suppose 1 is not a vertical line and its slope is m. Then the equation of 1 is y 5mx lb. where b is the y-intercept. If I passes through the point (xo. ys.), the equation of I can be written as y-yo-m(x-xo). If (x, y) and (x. yz) are two points in the x-y plane and x1 #x2. the slope of line passing through these points is m-(y2-y)/(x2-x1). Write a program that prompts the user two points in the x-y plane. The program outputs the equation of the line and uses if statements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If I is a non-vertical line, output its equation in the form y -mx +b.