Program n1;
const n=100;
var a: array [1..n] of integer;
i,k,sum,temp: integer;
begin
sum:=0;
k:=0;
for i:=1 to n do
begin
write('введите ',i,' элемент: ');
readln(temp);
if temp=0 then break;
if temp mod 8=0 then
begin
a[i]:=temp;
k:=k+1;
sum:=sum+a[i];
end;
end;
writeln('ср. ариф: ',sum/k);
end.