Question: Distance between two points ? b a r ( A B ) = ( x 1 - x 2 ) 2 + ( y 1

Distance between two points
?bar(AB)=(x1-x2)2+(y1-y2)22
Your main program should prompt for the values x1,x2,y1 and y 2, each which are to be real 32 values, and then call a function with the following signature:
procedure distance( x1: real32; x2 : real32; y1 : real32; y2 : real32);
@nodisplay; @noframe;
^^NEEDS TO USE THIS
A sample program dialogue is shown below.
Gimme a value for x1:8.1
Gimme a value for x2:4.1
Gimme a value for y1:2.2
Gimme a value for y2:-1.1
The distance between points A and B is 5.18555
Gimme a value for x1:8
Gimme a value for x2:4
Gimme a value for y1:2
Gimme a value for y2:-1
The distance between points A and B is 5.00000
Distance between two points ? b a r ( A B ) = ( x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!