July 2022 1 25 Report
СРОЧНО! Помогите нарисовать алгоритм!!!!
Вычислить сумму первых k слагаемых ряда :
1+1/(2^2)-1/(3^2)+1/(4^2)-...1/(k^2)
Вот решение.
var k,z,i:integer; s:real;
begin
readln(k);
z:=-1;
s:=1;
for i:=2 to k do
begin
z:=-z;
s:=s+z/(i*i);
end;
writeln('s = ',s);
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.