主题:帮个忙看哪儿错了
求1+1/2+1/3+..........1/100的程序?
program ll;
var i,s:real;
begin
s:=0;
for i:=1 to 100 do
s:=s+1/i;
write(s)
end.
大家看看我哪儿错了,运行结果是怎么是0呢.
program ll;
var i,s:real;
begin
s:=0;
for i:=1 to 100 do
s:=s+1/i;
write(s)
end.
大家看看我哪儿错了,运行结果是怎么是0呢.