var i,n,s:integer;
a:array[1..100] of integer;
begin
write('nhap n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
s:=0;
for i:=1 to n do s:=s+a[i];
write('tong la:',s);
readln
end.
uses crt;
var i,n,s:integer;
a:array[1..100] of integer;
begin
clrscr;
write('nhap n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
s:=0;
for i:=1 to n do
if a[i]>0 then s:=s+a[i];
writeln('tong la:',s);
readln;
end.