Question: . Take input the x and y coordinates of two points and output the straight - line distance between the two points. Also output, LONG
Lets assume user inputs the x and y coordinates of the first point in variables x1 and y1 and the x and y coordinates of the second point in variables x2 and y2.
It is OK to use digits in variable names as long as they are not at the beginning of the name.
The straight-line distance between the first and second points can be computed using the following formula
dist =
Hint:
You will need variables x1, y1, x2, y2 to hold user inputs.
A^B means A raised to the power of B. Calculating is the same as calculating X ^ 0.5
You will also need a multi-way decision structure in this problem.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
