CS 159 – HW #01YOUR NAME: __________________________________5 Points PossibleDue: January 25, 2010 at 11:00pm.Problem:Write a program that accepts as input two points and calculates the equation of the perpendicular bisector of the line segment between the given points. Do not concern yourself with input that may potentially result in a division by zero error.Example Execution:Enter x and y values for point 1: 2.0 -4.0Enter x and y values for point 2: 7.0 -2.0Two original points (2.0, -4.0) and (7.0, -2.0)Slope of the line between the two points: 0.40Slope of the perpendicular bisector: -2.50y intercept of the perpendicular bisector: 8.25Equation of the perpendicular bisector: y = -2.5x + 8.25Here are a few of the course standards to remember:1.Include the head_hw header on top of your assignment (found in your CS159directory). Be sure to include your PURDUE e-mail address after your name in the course header.2.Indent all code two spaces. 3.Place a space between all operators and operands.
This is the end of the preview.
access the rest of the document.