早教吧作业答案频道 -->数学-->
VB求eX=1+x/1!+x2/2!+X3/3!……帮忙具体解释下下面的代码Dimx,s,i,jc,n,s1AsDoublex=Me.TextBox1.Textjc=1:s=1:s1=1:i=1Dos=s*xjc=jc*in=s/jcs1=s1+ni=i+1LoopWhile(n>0.000001)Me.TextBox2.Text=Format(s1,
题目详情
VB 求eX=1+x/1!+x2/2!+X3/3!……
帮忙具体解释下下面的代码
Dim x,s,i,jc,n,s1 As Double
x = Me.TextBox1.Text
jc = 1 :s = 1 :s1 = 1 :i = 1
Do
s = s * x
jc = jc * i
n = s / jc
s1 = s1 + n
i = i + 1
Loop While (n > 0.000001)
Me.TextBox2.Text = Format(s1,"0.00")
帮忙具体解释下下面的代码
Dim x,s,i,jc,n,s1 As Double
x = Me.TextBox1.Text
jc = 1 :s = 1 :s1 = 1 :i = 1
Do
s = s * x
jc = jc * i
n = s / jc
s1 = s1 + n
i = i + 1
Loop While (n > 0.000001)
Me.TextBox2.Text = Format(s1,"0.00")
▼优质解答
答案和解析
Dim x, s, i, jc, n, s1 As Double x = Me.TextBox1.Text jc = 1 : s = 1 : s1 = 1 : i = 1 Do s = s * x ‘计算X的幂 jc = jc * i ’计...
看了VB求eX=1+x/1!+x2...的网友还看了以下: