Bài 1:
uses crt;
var a:array[1..20]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;
{-----------------------------------------------------------------}
t:=0;
for i:=1 to n do
if i mod 2=1 then t:=t+sqr(a[i]);
writeln('tong binh phuong cac phan tu o vi tri le la: ',t);
readln;
end.