Assignment - CS 159 HW #01 5 Points Possible Due: January...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 159 – HW #01 YOUR NAME: __________________________________ 5 Points Possible Due: 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.0 Enter x and y values for point 2: 7.0 -2.0 Two original points (2.0, -4.0) and (7.0, -2.0) Slope of the line between the two points: 0.40 Slope of the perpendicular bisector: -2.50 y intercept of the perpendicular bisector: 8.25 Equation of the perpendicular bisector: y = -2.5x + 8.25 Here are a few of the course standards to remember: 1. Include the head_hw header on top of your assignment (found in your CS159 directory). Be sure to include your PURDUE e-mail address after your name in the course header. 2.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/22/2010 for the course CS 159 taught by Professor Crum during the Spring '08 term at Purdue University-West Lafayette.

Ask a homework question - tutors are online