Question: Write a program that outputs the equation of the perpendicular bisector of the line segment between two points. Your program should perform the following: Prompt

Write a program that outputs the equation of the perpendicular bisector of the line segment between two points. Your program should perform the following: Prompt the user for the coordinates of the two points Compute the slope of the line between those two points Compute the coordinates of the midpoint of the line segment between the two points by averaging the two x coordinates and the two y coordinates Compute the slope of the perpendicular bisector by taking the negative reciprocal of the slope of the line segment. Compute the y intercept of the perpendicular bisector (you now have the slope m of the bisector and a point (X_mid, Y_mid) on the bisector, so the y intercept is y_mid - m X_mid) Output the labels of the original two points, and output in y = mx + b form at the equation of the perpendicular bisector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
