Let L be a line in the xy plane. If L is a vertical line, its equation is x=afor some real number a. Suppose L is not a vertical line and its slope is m. Then the equation of L is y=mx + b, where b is the y-intercept. If L passes through the point (x0,y0), the equation of L can be written as y –y0=m(x –x0). If (x1,y1)and (x2,y2)are two points in the xy plane and x1≠x2, the slope of the line passing through these points is m = (y2-y1)/ (x2-x1). Write a program that prompts the user to enter two points in the xy plane. The program outputs the equation of theline and uses ifstatements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If L is a nonvertical line, output its equation in the form y=mx + b.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here