求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-不知道哪里错了Private Sub Command1_Click()Dim a As Double,i As Integer,s As Singlef = -1i = 1Doa = 1 / (i * (i + 1))s = 1 + f * ai = i + 1f = -

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 09:39:16
求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-不知道哪里错了PrivateSubCommand1_Click()DimaAsDouble,iAsInt

求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-不知道哪里错了Private Sub Command1_Click()Dim a As Double,i As Integer,s As Singlef = -1i = 1Doa = 1 / (i * (i + 1))s = 1 + f * ai = i + 1f = -
求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-
不知道哪里错了Private Sub Command1_Click()
Dim a As Double,i As Integer,s As Single
f = -1
i = 1
Do
a = 1 / (i * (i + 1))
s = 1 + f * a
i = i + 1
f = -f
Loop Until Abs(a) < 10 ^ (-5)
Print s
End Sub
求教

求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-不知道哪里错了Private Sub Command1_Click()Dim a As Double,i As Integer,s As Singlef = -1i = 1Doa = 1 / (i * (i + 1))s = 1 + f * ai = i + 1f = -
Private Sub Command1_Click()
Dim a As Double,i As Long,s As Single
f = -1
i = 1
Do
a = 1 / (i * (i + 1))
s = 1 + f * a
i = i + 1
f = -f
Loop Until Abs(a) < 10 ^ (-5)
Print s
End Sub

求教一道简单的VB题,直到最后一项的绝对值小于10-5为止.1-1/(1*2)+1/(2*3)-不知道哪里错了Private Sub Command1_Click()Dim a As Double,i As Integer,s As Singlef = -1i = 1Doa = 1 / (i * (i + 1))s = 1 + f * ai = i + 1f = - VB求圆周率∏的近似值.公式为 = 1- + - …+(-1)(n+1)× ,直到最后一项的绝对值小 一道简单的物理密度题求教 用vb求pi/4 = 1-1/3+1/5-1/7+...公式求pi的近似值,直到最后一项绝对值小于10-6为止 1.用公式计算:COSX=1-X*X/2!X*X*X*X/4!-X*X*X*X*X*X/6!.直到最后一项的绝对 VB求e的近似值利用e^x的近似公式计算e(直到最后一项小于10^-6)e^x=1+x/1!+x^2/2!+……x^n/n!注意是求e的近似值! VB.NET:π/4 ≈ 1 - 1/3 + 1/5 - 1/7 + 1/9 -…±1/n 求π的近似值,直到最后一项的绝对值小于10-4为止.这个求出来永远是4…… 用公式:π/4=1-1/3+1/5-1/7~求π的值,直到最后一项小于10^-6为止.用VB中的(Do while)语句怎么做, 输入X,利用公式e^x=1+x+x^2/2!+x^3/3!+…求e^x的近似值,直到最后一项绝对值小于-10^-6用VB (Microsoft Visual Studio 2005)这个软件 VB循环结构的一道题 简单高数题目一道 求教 积分求这道积分题的详解过程和答案 VB求和:1/(1*2)-1/(2*3)+1/(3*4)…… 直到最后一项绝对值小于0.006为止 c语言编程 求X+X^2/2!+X^3/3!...的值,直到最后一项 简单的物理题,求教第三题 绝对有挑战的一道题 简单的一道线性代数题最后一道、第二大题怎么证明? 一道线性代数的题!求教!如题 求教一道概率论和数理统计的题