1)
var
i, j: integer;
ar: array[1..6, 1..6]of integer;
begin
for i := 1 to 6 do
for j := 1 to 6 do read(ar[i, j]);
writeln;
for i := 1 to 6 do swap(ar[i, 1], ar[i, 6]);
for i := 1 to 6 do swap(ar[i, 2], ar[i, 5]);
for i := 1 to 6 do swap(ar[i, 3], ar[i, 4]);
for i := 1 to 6 do
begin
for j := 1 to 6 do write(ar[i, j], ' ');
writeln;
end;
end.
2)
var
mr, rm: array [1..6, 1..6] of integer;
i, j: integer;
begin
for i := 1 to 6 do
for j := 1 to 6 do read(mr[i, j] );
for i := 1 To 6 do
for j := 1 To 6 do
rm[i, j] := mr[j, i];
writeLn;
for i := 1 to 6 do
begin
for j := 1 to 6 do write(rm[i, j],' ');
writeln;
end;
readln;
end.