2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Jx_Man
3

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.

Edited by Jx_Man: n/a

Votes + Comments
Quick respon
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.