计算当x=2, n=10时 , y=x/1+x^5/5!+x^9/9!+...+x^(4n+1)/(4n+1)! 的值。
答案:1 悬赏:10 手机版
解决时间 2021-03-21 05:34
- 提问者网友:寂寞梧桐
- 2021-03-20 14:41
计算当x=2, n=10时 , y=x/1+x^5/5!+x^9/9!+...+x^(4n+1)/(4n+1)! 的值。
最佳答案
- 五星知识达人网友:底特律间谍
- 2021-03-20 16:05
Option Explicit
Private Sub CommandButton1_Click()
TextBox1.Text = CStr(Calc(2, 10))
End Sub
Function Calc(x As Integer, n As Integer) As Double
Calc = x
Dim i As Integer, j As Integer
Dim tem As Double
For i = 1 To n
tem = 1
For j = 1 To (4 * i + 1)
tem = tem * x / j
Next j
Calc = Calc + tem
Next i
End Function
Private Sub CommandButton1_Click()
TextBox1.Text = CStr(Calc(2, 10))
End Sub
Function Calc(x As Integer, n As Integer) As Double
Calc = x
Dim i As Integer, j As Integer
Dim tem As Double
For i = 1 To n
tem = 1
For j = 1 To (4 * i + 1)
tem = tem * x / j
Next j
Calc = Calc + tem
Next i
End Function
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯