uses crt;
var a:array[1..300]of integer;
i,n,t,tb: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 i mod 2=1 then t:=t+a[i];
tb:=0;
for i:=1 to n do
tb:=tb+a[i];
writeln('Tong cac phan tu cua day o vi tri le la: ',t);
writeln('Trung binh cong cua day la: ',tb/n:4:2);
readln;
end.