See if this help :
Program CalculateDistance;
Uses WinCrt;
var
x1,x2,y1,y2:integer;
d:real;
begin
Writeln;
Write('Input A (X1): ');readln(x1);
Write('Input B (X2): ');readln(x2);
Write('Input A (Y1): ');readln(y1);
Write('Input B (Y2): ');readln(y2);
d:=sqrt(sqr(x2-x1)+sqr(y2-y1));
Writeln;
Writeln('Distance between A and B is: ',d:4:2);
end.
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444