?s
Return
S=1+1/3+1/5+…1/n S=1+1/2+1/4+…1/n
Input “N=” to n S=1
For i=2 to n step 2
S=s+1/i Endfor ?s
Return
S=1-1/2+1/3-1/4+…1/n,n键盘 1)
S=-1+1/2-1/3+1/4-…1/n, -1 1 -1 1 -1
I=1,2,…n S=s+1/i*(-1)^i 2)通用
S=1/1-1/3+1/5-1/7+….1/n Input “n=” to n S=0 d=1
for i=1 to n step 2 s=s+1/i*d d=-d endfor ?s
Return
S=-1/2+1/4-1/6+1/8-…1/n Input “n=” to n

