Var ma:array[1..4,1..5] of integer;
ar:array[1..20] of integer;
k,i,j:integer;
begin;
randomize;
writeln('Matrix:');
for i:=1 to 4 do
begin;
writeln;
for j:=1 to 5 do
begin;
ma[i,j]:=random(-10,10);
if ma[i,j]<0 then<br> begin;
inc(k);
ar[k]:=ma[i,j];
end;
write(ma[i,j]:4);
end;
end;
writeln;
writeln('Final array:');
for i:=1 to k do
write(ar[i]:4);
end.