1.Вычислить сумму ряда s= cos(x)+cos(x)*cos(x)+...+cos(x)*cos(x)*...*cos(x), для x и n введенных с клавиатуры.
Ответы на вопрос
Ответил Maxim2001n2
0
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.
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
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.
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.
Новые вопросы
Английский язык,
2 года назад
Математика,
2 года назад
Химия,
9 лет назад
Алгебра,
9 лет назад
Математика,
10 лет назад