Var
mas_in, mas_out : array [1..100,1..100] of integer;
n,m,i,j:integer;
begin
write('Введите количество строк n='); readln(n);
write('Введите количество столбцов m='); readln(m);
for i:=1 to n do
for j:=1 to m do
mas_in[i,j]:=random(99);
//mas_in[i,j]:=i*(j+i);
writeln('Исходная матрица');
for i:=1 to n do
begin
for j:=1 to m do
write(mas_in[i,j]:2,' ');
writeln;
end;
for i:=1 to n do
begin
for j:=1 to m do
mas_out[i,j]:=mas_in[i,m-j+1];
end;
writeln('Конечная матрица');
for i:=1 to n do
begin
for j:=1 to m do
write(mas_out[i,j]:2,' ');
writeln;
end;
end.