Lời giải :
program hotrotinhoc ;
var a: array[1..32000] of integer ;
i,n : integer ;
begin
write('Nhap do dai cua mang'); readln(n);
writeln('Nhap gia tri cua cac phan tu');
for i:= 1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
dem:=0;
for i:= 1 to n do
if a[i] < 0 then dem:=dem+1;
write('Co tat ca ',dem,' phan tu am');
readln
end.