uses crt;
var a:array[1..10]of integer;
i,n,tb:integer;
begin
clrscr;
for i:=1 to 10 do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to 10 do
if a[i]>=8 then write(a[i]:4);
tb:=0;
for i:=1 to 10 do
tb:=tb+a[i];
writeln;
writeln('Diem trung binh cua 10 ban la: ',tb:4:2);
readln;
end.