(1-1/2)+ (1/3-1/4)+ (1/5-1/6)...+ (1/99-1/100)=?

来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/19 14:35:18
(1-1/2)+(1/3-1/4)+(1/5-1/6)...+(1/99-1/100)=?(1-1/2)+(1/3-1/4)+(1/5-1/6)...+(1/99-1/100)=?(1-1/2)+(1

(1-1/2)+ (1/3-1/4)+ (1/5-1/6)...+ (1/99-1/100)=?
(1-1/2)+ (1/3-1/4)+ (1/5-1/6)...+ (1/99-1/100)=?

(1-1/2)+ (1/3-1/4)+ (1/5-1/6)...+ (1/99-1/100)=?
这道题我做过.程序如下:
var s:real; i,j:integer;
begin
s:=0;
j:=1;
for i:=1 to 100 do
begin
s:=s+j/i;
j:=j*-1;
end;
writeln(s:0:3);
end.
输出结果为:
0.688

256分之255

(1-1/2)+ (1/3-1/4)+ (1/5-1/6)...+ (1/99-1/100)

这道题是典型的拆后计算。