Const
n = 6;
m = 8;
type mas = array[1..n,1..m] of integer;
var
a : mas;
i, j : integer;
f, g : text;
procedure change(var z : mas);
var i, j, k, t : integer;
begin
k := n div 2;
for i := 1 to k do
for j := 1 to m do
begin
t := a[n-i+1, j];
a[n-i+1, j] := a[i,j];
a[i,j] := t
end;
end;
begin
assign(f, 'mtrx.txt');
assign(g, 'mtrx1.txt');
reset(f);
writeln('матрица:');
for i := 1 to n do
begin
for j := 1 to m do
begin
read(f, a[i,j]);
write(a[i,j]:4)
end;
writeln
end;
close(f);
rewrite(g);
change(a);
writeln('новая матрица:');
for i := 1 to n do
begin
for j := 1 to m do
begin
write(a[i,j]:4);
write(g, a[i,j]:4)
end;
writeln;
writeln(g)
end;
close(g);
writeln('копия новой матрицы сохранена а файл!');
readln
end.
в ответах не рабочая