求解一道QB的题,quickbasic语句.(1+1/3+1/5+1/7+1/9)-(1/2+1/4+1/6+1/8+1/10)

问题描述:

求解一道QB的题,quickbasic语句.(1+1/3+1/5+1/7+1/9)-(1/2+1/4+1/6+1/8+1/10)

Basic好久不用了,不知道有没有语法错误
DIM S#, K#
S=0: K=1
For i = 1 To 10
S = S + 1.0 / i
K = -K
Next i
Print S