Var a: array [1..100] of integer; i, temp: integer;
begin
randomize;
writeln();
for i := 1 to 100 do
a[i] := random(1000);
for i := 1 to 100 do
write(a[i], ' ');
writeln();
temp := a[1];
for i := 2 to 100 do
a[i - 1] := a[i];
a[100] := temp;
for i := 1 to 100 do
write(a[i], ' ');
end.
--------------
var x, y: array [1..1000] of real; i, n: integer; left, right, up, down: real;
begin
read(n);
for i := 1 to n do
read(x[i], y[i]); {Вершины вводятся с клавиатуры}
left := x[1];
right := x[1];
up := y[1];
down := y[1];
for i := 2 to n do
begin
if(left > x[i])
then
left := x[i];
if(right < x[i])
then
right := x[i];
if(down > y[i])
then
down := y[i];
if(up < y[i])
then
up := y[i];
end;
writeln('left-down vertex: (', left, ', ', down,')');
writeln('right-up vertex: (', right, ', ', up,')');
writeln('perimeter: ', 2 * (right - left + up - down));
writeln('area: ', (right - left) * (up - down));
end.