.VB中:对于X值,求e^x=1+x+x^2/2!+x^3/3!+….+x^n/n!+……直到最后一项小于10^-6.界
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/14 23:21:57
.VB中:对于X值,求e^x=1+x+x^2/2!+x^3/3!+….+x^n/n!+……直到最后一项小于10^-6.界面自己设定.
验证一下,不知道对不
Private Sub Ca()
Dim x As Single
Dim n As Integer
Dim i As Integer
Dim j As Integer
Dim Xn As Single
Dim Nn As Single
Dim Sum As Single
x = InputBox("请输入x的值")
n = 10000
Sum = 1 + x
i = 2
Do
Xn = 1
Nn = 1
For j = 1 To i
Xn = Xn * x
Nn = j * Nn
Next j
Sum = Sum + Xn / Nn
i = i + 1
Loop While (Xn / Nn) < 0.000001
End Su
Private Sub Ca()
Dim x As Single
Dim n As Integer
Dim i As Integer
Dim j As Integer
Dim Xn As Single
Dim Nn As Single
Dim Sum As Single
x = InputBox("请输入x的值")
n = 10000
Sum = 1 + x
i = 2
Do
Xn = 1
Nn = 1
For j = 1 To i
Xn = Xn * x
Nn = j * Nn
Next j
Sum = Sum + Xn / Nn
i = i + 1
Loop While (Xn / Nn) < 0.000001
End Su
VB求e的近似值利用e^x的近似公式计算e(直到最后一项小于10^-6)e^x=1+x/1!+x^2/2!+……x^n/
输入X,利用公式e^x=1+x+x^2/2!+x^3/3!+…求e^x的近似值,直到最后一项绝对值小于-10^-6
用JAVA编写程序,计算:ex=1+x+x2/2!+ x3/3!+……+ xn/n!,直到最后一项小于10的5次方
C语言中编写s=1-x+(x*x)/2!-(x*x*x)/3!+(x*x*x*x)/4!知道最后一项的绝对值小于10的-
用c#工具编程,y=1/x+1/x^2+1/x^3……,直到最后一项小于10^-4为止.
vb求和,求sin(x)=x/1-x^3/3!+x^5/5!- …… (-1)^(n-1)* x^(2*n-1)/(2n
C语言 f(x)=1+x+x^2/2!+x^3/3!+...+x^n/n!直到|x^n/n|
c语言编程 求X+X^2/2!+X^3/3!...的值,直到最后一项
c语言编程:利用公式1+X+X2/2!+X3/3!+……+XN/N!,计算eX,X为输入数据,要求公式最后一项值小于万分
编程计算y=1+1/x+1/(x*x)+1/(x*x*x)+.的值(x>1),直到最后一项小于10的负4次方
lim(x趋于0时)[(e^x+e^2x+e^3x+……e^nx)/n]^(1/x)的极限是多少?其中n为有限值.
对于任意实数X,等式X^2(x+m)-3x(x+2)-2n=x(x^2-6)+4都成立,求M,N的值?