CLEAR
SET TALK off
m=1
n=2
l=0
sss=1
c=0
i=0
DO while(1/n>=0.01)
sss=sss+1/n
DO ss with m,n
enddo
?"其和值为:",STR(sss,10,5),SPACE(10),"1/n的值为:",STR(1/n,10,5)
procedure ss
lPARAMETERS m,n
l=m+n
m=n
n=l
return
endfunc
****************************************
运行结果是这样的:其和值为:2.34171 1/n的值为:0.00694
不知对不对,自己看看