Presupun ca Pascal:
program a_1;
var a : array[1..5] of integer;
i, n, :nr integer;
begin
write('Numarul de elemente: '); readln(n);
for i := 1 to n do
begin
write('a[',i,']=');
readln(a[i]);
end;
nr:=0;
for i := 1 to n do
if(a[i]<0) then
nr:=nr+1;
write(a[i],'_');
write('Sunt ',nr,' numere negative in sir');
readln;
end.