FPC IDE 2.6.0
var a,b:array[1..10] of integer; i,k,z:integer;
begin z:=1;
for i:=1 to 10 do
begin
a[i]:=random(25)-15;
if a[i]>0 then a[i]:=sqr(a[i]);
if a[i]<0 then begin b[z]:=a[i]; a[i]:=12345; inc(k); inc(z); end;<br>end;
for i:=1 to 10 do
writeln('a[',i,']=',a[i]);
writeln('Kol-vo otricatelnux: ',z-1);
for i:=1 to z-1 do writeln('Otricatelnie elementy: ',b[i]);
readln;
end.