The Distance Program
The program we will work on is designed to compute the distance between two x-y points. This program necessarily requires the input of two (2) sets of x-y coordinates. Once the input is complete, the distance between those points will be computed using the euclidean distance formula:
The original inputs and the computed distance value will then be sent to the screen using a descriptive message. For example:
Please enter an x-coordinate: 6 Please enter a y-coordinate: 1 Please enter an x-coordinate: 0 Please enter a y-coordinate: 0 First coordinate: (6, 1) Second coordinate: (0, 0) Distance: 6.08