1)
Program n1;
var sum,k,a: integer;
begin
sum:=0;
k:=0;
readln(a);
while a<>0 do
begin
sum:=sum+a;
k:=k+1;
readln(a);
end;
write('сумма: ',sum,'; срзнач: ',sum/k);
end.
2)
Program n2;
var a,c,sum: real;
k: integer;
begin
k:=1;
readln(a,c);
sum:=a;
repeat
sum:=sum+a*0.25;
k:=k+1;
until sum>=c;
write(k);
end.