Question: Write a program that asks the user the slope and y-intersect of one line y = a_1x + b_1, the slope and y-intersect of a

 Write a program that asks the user the slope and y-intersect

Write a program that asks the user the slope and y-intersect of one line y = a_1x + b_1, the slope and y-intersect of a second line y = a_2x + b_2. The program returns the point of intersection of the two lines, if it exists. Otherwise, the program must print a message to indicate that the two lines do not have a point of intersection. Recall that, if it exists, the point of intersection (x_o, y_o) of two lines y = a_1x + b_1 and y = a_2x + b_2 is such that x_o = b_2 - b_1/a_1 - a_2 and Also, recall that two lines are parallel (and thus do not intersect) if they have the same slope. For this program you may choose your own user prompt and printed messages

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!