.VB中:对于X值,求e^x=1+x+x^2/2!+x^3/3!+….+x^n/n!+……直到最后一项小于10^-6.界面自己设定.

问题描述:

.VB中:对于X值,求e^x=1+x+x^2/2!+x^3/3!+….+x^n/n!+……直到最后一项小于10^-6.界面自己设定.

验证一下,不知道对不Private Sub Ca()Dim x As SingleDim n As IntegerDim i As IntegerDim j As IntegerDim Xn As SingleDim Nn As SingleDim Sum As Singlex = InputBox("请输入x的值")n = 10000Sum = 1 + xi = 2D...