Question: Write a program that outputs the equation of the perpendicular bisector of the line segment between two points, Your program should - prompt for and

 Write a program that outputs the equation of the perpendicular bisector

Write a program that outputs the equation of the perpendicular bisector of the line segment between two points, Your program should - prompt for and input the coordinates of two points [for examplo (2.0,4.0) and (7.0,2.0)]; - 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 fwo 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 fyou now have the slope m of the bisector and a point (xmid , ymid) on the bisector, so the y intercept is ymid - m'xemid ) and - output the midpoint coordinates and the equation of the besector as shown below. The figure above illustrates the sample line segment mentioned above and its perpendicular bisector: Note: You need to consider the special cases where the perpendicular bisector is verical or horvontal as shown in the samplo runs 2 and 3

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!