Const nx=20;mx=20;var i,j,n,m:integer; D:array[1..mx,1..nx] of integer;p:double;
begin
write('Введите размер массива m и n');Readln(m,n);p:=1;
for i:=1 to m do begin
for j:=1 to n do begin
Readln(D[i,j]);end;end;writeln;
for i:=1 to m do begin
for j:=1 to n do begin
write(D[i,j]:4);end;writeln;end;writeln;
for i:=1 to m do begin
for j:=1 to n do begin
if i = n-j+1 then begin write(D[i,j]:4); p:= p * D[i,j];end
else write(' ':4);end;writeln;end;writeln;
for i:=1 to m do begin
for j:=1 to n do begin if i =j then begin write(D[i,j]:4); p:= p * D[i,j];end
else write(' ':4);end;writeln;end;writeln;
write('произведение диагональных элементов массива =',p);end.