{3.29(zh)
Po zadannym koordinatam 3-x vershin treugol'nika
nayti ego ploshad' i perimetr}
program ploshad(input,output);
var ab,bc,ac,xa,ya,xb,yb,xc,yc,s,p:real;
begin
    write('vvedite koordinaty tochki A'); readln(xa,ya);
    write('vvedite koordinaty tochki B'); readln(xb,yb);
    write('vvedite koordinaty tochki C'); readln(xc,yc);
    ab:=sqrt(sqr(xb-xa)+sqr(yb-ya));
    bc:=sqrt(sqr(xb-xc)+sqr(yb-yc));
    ac:=sqrt(sqr(xc-xa)+sqr(yc-ya)); {vychislenie dlin storon treygol'nika}
    p:=ac+ab+bc;
    s:=sqrt(p/2*(p/2-ab)*(p/2-ac)*(p/2-bc)); {vychislenie ploshadi po formule gerona}
    writeln('perimetr=',p:1:4,'  ploshad''=',s:1:4)
end.
