1:
uses crt;
var a:array[1..1000]of integer;
i,n,t:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{--------------------------xuat----------------------------}
for i:=1 to n do
write(a[i]:4);
{----------------------xu-ly------------------------------}
t:=0;
writeln;
for i:=1 to n do
t:=t+a[i];
writeln('tong cua day so la: ',t);
readln;
end.
2:
uses crt;
var a:array[1..1000]of integer;
i,n:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('nhap diem mon thu ',i,'='); readln(a[i]);
end;
{--------------------------xuat----------------------------}
for i:=1 to n do
write(a[i]:4);
readln;
end.