program njn;
uses crt;
var a:array [1..100] of integer;
i,p:integer;
s:real;
begin
clrscr;
readln(a[1],q,n);
s:=0;
p:=a[1];
for i:=2 to n do begin
a[i]:=p*q;
p:=a[i];
end;
for i:=1 to n do
writeln(a[i]);
s:=s+a[i];
writeln('Среднее=',s/n);
readln;
end.
program njn;
uses crt;
var a:array [1..100] of integer;
i,p:integer;
s:real;
begin
clrscr;
readln(a[1],q,n);
s:=0;
p:=a[1];
for i:=2 to n do begin
a[i]:=p*q;
p:=a[i];
end;
for i:=1 to n do
writeln(a[i]);
for i:=1 to n do
s:=s+a[i];
writeln('Среднее=',s/n);
readln;
end.