uses crt;
const nmax=20;
var a:array[1..nmax,1..nmax] of integer;
m,n,i,j:byte;
p:longint;
begin
clrscr;
randomize;
repeat
write('Количество строк до ',nmax,' n=');
readln(n);
until n in [1..nmax];
repeat
write('Количество столбцов до ',nmax,' m=');
readln(m);
until m in [1..nmax];
writeln('Исходная матрица:');
p:=1;
for i:=1 to n do
begin
for j:=1 to m do
begin
a[i,j]:=random(20)-10;
write(a[i,j]:4);
if(a[i,j]<0)and(a[i,j] mod 2=0) then p:=p*a[i,j];
end;
writeln;
end;
writeln;
write('Произведение отрицательных четных=',p);
readln
end.