elaborati un program in pascal
Elaborati o functie care calculeaza aria dreptunghiului
Se considera urmatoarele tipuri de date:
type Punct=record
x,y:real
end;
Dreptunghi=record
A,B,C,D:Punct
end;
function dist(A,B:Punct):real; begin dist:=sqrt(sqr(b.x - a.x)+sqr(b.y-a.y)); end; function aria(d:dreptunghi):real; begin aria:=dist(d.a,d.b)*dist(d.a,d.d); end;