Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  da
Language: PASCAL
Code:
program n_7;
var a,b,c,p,ax,ay,bx,by,cx,cy,s:real;
function sol(var ax,ay,bx,by,cx,cy,:integer):real;
begin
writeln ('ax=');
readln (ax);
writeln ('ay=');
readln (ay);
writeln ('bx=');
readln (bx);
writeln ('by=');
readln (by);
writeln ('cx=');
readln (cx);
writeln ('cy=');
readln (cy);
end;
begin
a:=sqrt(sqr(ax-bx)+sqr(ay-by));
b:=sqrt(sqr(bx-cx)+sqr(by-cy));
c:=sqrt(sqr(cx-ax)+sqr(cy-ay));
writeln ('a=', a);
writeln ('b=', b);
writeln ('c=', c);
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln ('ploshad=',s);
end.
          
Comments: