program csaf;
uses crt;
var t,i,n: integer;
a: array[1..1000] of integer;
begin
clrscr;
writeln('nhap so phan tu cua day: '); readln(n);
t:=0;
for i:=1 to n do
begin
write('a[',i,']= '); readln(a[i]);
if a[i] >0 then t:=t+a[i];
end;
writeln('tong cac so lon hon 0 trong mang la: ',t);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i]>0 then t:=t+a[i];
writeln(t);
readln;
end.