Engineering C/C++ - EGR 155

Program 1: Equations of a Line

Write a program to compute the equation of a line in slope intercept form given two points on the line. Your program should be able to handle any two points. The program should ask for the two points as input, and output the equation of the line in slope intercept form. It must be able to handle vertical, horizontal and oblique lines, as well as someone entering the same point twice. As an example, if someone entered the points (1, 3) and (2, 5), the program should output Y = 2X + 1.