program tinhtong;
uses crt;
var i, s, n : integer;
a : array [1..100] of integer;
begin
clrscr;
write('So thu n la: '); readln(n);
s:=0
for i:=1 to n do begin
write('Nhap so thu ',i); readln(a[i]);
s:=s+a[i]; end;
writeln('Tong cac so do la: ',s);
readln
end.
uses crt;
var i, n: integer;
s: longint;
a: array [1..100] of integer;
begin
write('nhap so n:'); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
for i:=1 to n do
s:= s+ a[i];
writeln('tong cua cac so do la:',s);
readln
end.