VB计算 1-1/3!+1/5!-1/7!+……+(-1)^(n-1)/(2n-1)!请填空Private Sub Command1_Click()Dim i As Integer,j As IntegerDim n As IntegerDim s As Doublej=1s=1n = Val(Text1.Text)For i = 2 To nj=__________ '计算1/(2*i-1)!s=_______________' l累加
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 07:38:25
VB计算 1-1/3!+1/5!-1/7!+……+(-1)^(n-1)/(2n-1)!请填空Private Sub Command1_Click()Dim i As Integer,j As IntegerDim n As IntegerDim s As Doublej=1s=1n = Val(Text1.Text)For i = 2 To nj=__________ '计算1/(2*i-1)!s=_______________' l累加
VB计算 1-1/3!+1/5!-1/7!+……+(-1)^(n-1)/(2n-1)!请填空
Private Sub Command1_Click()
Dim i As Integer,j As Integer
Dim n As Integer
Dim s As Double
j=1
s=1
n = Val(Text1.Text)
For i = 2 To n
j=__________ '计算1/(2*i-1)!
s=_______________' l累加通项式
Next i
text2.text=str(s)
VB计算 1-1/3!+1/5!-1/7!+……+(-1)^(n-1)/(2n-1)!请填空Private Sub Command1_Click()Dim i As Integer,j As IntegerDim n As IntegerDim s As Doublej=1s=1n = Val(Text1.Text)For i = 2 To nj=__________ '计算1/(2*i-1)!s=_______________' l累加
j * (2 * i - 2) * (2 * i - 1)
s + (-1) ^ (n - 1) / j