In pascal (ABC), using the procedure (in any way), write the problem: The rectangle is given by its coordinates

In pascal (ABC), using the procedure (in any way), write the problem: The rectangle is given by its coordinates, calculate the perimeter.

program zz1;

var
x1, x2, x3, x4, y1, y2, y3, y4: integer; // set variables of integer type
p, k: real;
procedure pr (f1, f2, g1, g2: integer; var f: real); // describe the procedure
begin
f: = sqrt (sqr (f1-g1) + sqr (f2-g2));
end;
begin
write (‘enter the coordinates of the first corner of the rectangle’);
read (x1, y1);
write (‘enter the coordinates of the second corner of the rectangle’);
read (x2, y2);
write (‘enter the coordinates of the third corner of the rectangle’);
read (x3, y3);
write (‘enter the coordinates of the fourth corner of the rectangle’);
read (x4, y4);
pr (x1, y1, x2, y2, k);
p: = p + k;
pr (x1, y1, x4, y4, k);
p: = p + k;
pr (x3, y3, x2, y2, k);
p: = p + k;
pr (x3, y3, x4, y4, k);
p: = p + k;
write (‘rectangle perimeter =’, p);
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.