program hh;
uses crt;
const n=10;
type a=array[1..n,1..n] of integer;
a1=array[0..n*n] of integer;
var b:a; c:a1;
i,j,k,m,t,s,p,v:integer;
Begin
clrscr;
randomize;
{readln(t);}
for i:=1 to n do begin
for j:=1 to n do begin
b[i,j]:=random(20)-10;
write(b[i,j]:7); end;
writeln; end;
writeln('-------------------');
c[0]:=0;
for i:=1 to n do
for j:=1 to n do
if b[i,j]<>0 then begin
inc(c[0]);
c[c[0]]:=b[i,j];
end;
write('new array:'); if c[0]<>0 then
for i:=1 to c[0] do write(c[i],'') else writeln('no elem');
end.