你好,用matlab计算。程序如下:var s:real; i,j:integer;begins:=0;j:=1;for i:=1 to 100 dobegins:=s+j/i;j:=j*-1;end;writeln(s:0:3);end.输出结果为:0.688你的没错的,恭喜!