Var a:array [1..100,1..100] of integer;
b:array [1..10000] of integer;
i,j,k,m,n:integer;
begin
k:=0;
writeln('Введите размерность массива');
read (m, n);
writeln ('Введите массив');
for i:=1 to m do
for j:=1 to n do read(a [i,j]);
for i:=1 to m do
for j:=1 to n do if (a[i,j] mod 2=0) then begin
k:=k+1;
b [k]:=a [i,j];
end;
for i:=1 to k do write(b[i], ' ');
end.