const n=5;
type mas=array[1..n] of integer;
procedure Vvod(var v:mas);
var i:integer;
begin
for i:=1 to n do
v[i]:=random(100)-50;
end;
procedure Vyvod(var v:mas);
var i:integer;
begin
for i:=1 to n do
write(v[i]:4);
writeln;
writeln;
end;
procedure Sdvig(var v:mas;k:integer);
var i,j,bf:integer;
begin
for j:=1 to k do
begin
bf:=v[1];
for i:=1 to n-1 do
v[i]:=v[i+1];
v[n]:=bf;
end;
end;
var a,b:mas;
begin
Vvod(a);
Vyvod(a);
b:=a;
Sdvig(b,1);
Vyvod(b);
b:=a;
end.
type mas=array[1..n] of integer;
procedure Vvod(var v:mas);
var i:integer;
begin
for i:=1 to n do
v[i]:=random(100)-50;
end;
procedure Vyvod(var v:mas);
var i:integer;
begin
for i:=1 to n do
write(v[i]:4);
writeln;
writeln;
end;
procedure Sdvig(var v:mas;k:integer);
var i,j,bf:integer;
begin
for j:=1 to k do
begin
bf:=v[1];
for i:=1 to n-1 do
v[i]:=v[i+1];
v[n]:=bf;
end;
end;
var a,b:mas;
begin
Vvod(a);
Vyvod(a);
b:=a;
Sdvig(b,1);
Vyvod(b);
b:=a;
end.