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.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку