Uses crt;
var a: array [0..5,0..5] of integer; i, j, sdvig ,k: integer;
Begin
writeln('Ввод матрицы:');
for i := 1 to 5 do
begin
for j := 1 to 5 do
read(a[i,j]);
end;
write('Сдвиг на ');
readln(sdvig);
for i := 1 to 5 do
for k := 1 to sdvig do
begin
a[i,0] := a[i,5];
for j := 5 downto 1 do
a[i,j] := a[i,j - 1];
end;
for i := 1 to 5 do
begin
for j := 1 to 5 do
write(a[i,j],' ');
writeln;
end;
End.