Var x1,y1,x2,y2,x3,y3,a,b,c:real;
begin
write('x1, y1: '); readln(x1,y1);
write('x2, y2: '); readln(x2,y2);
write('x3, y3: '); readln(x3,y3);
a:=sqrt(sqr(x2-x1)+sqr(y2-y1));
b:=sqrt(sqr(x3-x2)+sqr(y3-y2));
c:=sqrt(sqr(x3-x1)+sqr(y3-y1));
writeln('a = ',a:4:2,' b = ',b:4:2,' c = ',c:4:2);
end.
Пример:
x1, y1: 1 1
x2, y2: 4 1
x3, y3: 4 5
a = 3.00 b = 4.00 c = 5.00