CS 123 Homework #1

Due: Sept.17

You will find in the file ~weltyc/public_html/cs123/proj1.C a start at a program to find the distance between two points in a Cartesian Coordinate System. Unfortunately, the person who wrote the program was hit by a car recently and did not have time to finish it. We desperately need this program to run in order to prevent a catastrophe of vague specifications and global proportions.

The program should request the first two coordinates. These two should be typed in separated by a space and followed by a return, and then the program should request the second pair of coordinates, which should again be separated by a space and followed by a return. An interaction with the working program should look something like:

cssun12[422]: a.out
Enter first coordinates: 1 2
Enter second coordinates: 3 4

The distance is: 2.82843

The program is very close to finished, and requires only a few changes. Some of them are tricky. A correct program must compile and run successfully.

As usual, should you or any of your classmates be captured or killed, the registrar will cancel your existence at Vassar. Good luck. This web page will self destruct in five seconds.