i,n,t:integer;
begin
write('nhap so phan tu cua mang')
for i:=1 to n do
begin
write('phan tu thu ',i,' : ');
readln(a[i]);
end;
for i:=1 to n do
t:= t + a[i]
write('tong cac phan tu trong mang la :',t);
readln
end.
Program bai1;
uses crt;
var a: array [1..1000] of integer;
i,n,dem: integer;
begin
clrscr;
write('nhap n ='); readln(n);
for i:= 1 to n do
begin
write('nhap a[',i,'] ='); readln(a[i]);
end;
dem:=0;
for i:= 1 to n do
if a[i] < 0 then dem:=dem+1;
write('so luong cac so am la : ',dem);
readln;
end.