编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 04:27:28
编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..编程e=1+1/1i+1/2i+...,求求

编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..
编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..

编程e=1+1/1i+1/2i+...,求求e的近似值,精确小数点后6位,..
Function nn(n As Long) As Double
Dim i As Long
nn = 1
For i = 1 To n
nn = nn * i
Next
End Function
Function sumn() As Double
Dim i As Long
sumn = 0
For i = 0 To 32767
sumn = sumn + 1 / nn(i)
If xn(x, i) / nn(i) < 0.0000001 Then Exit For
Next
End Function

i什么取值啊