Var n, i: Integer; x, sum, temp, cosx: Double; begin ReadLn(x, n); sum:=0; cosx:=cos(x); temp:=1; for i:=1 to n do begin temp:=temp*cosx; sum:=sum+temp; end; WriteLn(sum); end.
Var x, n, i, j, r: Integer; sum, temp: Double; begin ReadLn(x, n); sum:=0; r:=cos(x); for i:=1 to n do begin temp:=r; for j:=1 to i do temp:=temp*temp; sum:=sum+temp; end; WriteLn(sum); end.
x, sum, temp, cosx: Double;
begin
ReadLn(x, n);
sum:=0;
cosx:=cos(x);
temp:=1;
for i:=1 to n do begin
temp:=temp*cosx;
sum:=sum+temp;
end;
WriteLn(sum);
end.
sum, temp: Double;
begin
ReadLn(x, n);
sum:=0;
r:=cos(x);
for i:=1 to n do begin
temp:=r;
for j:=1 to i do temp:=temp*temp;
sum:=sum+temp;
end;
WriteLn(sum);
end.