[填空題] 本程序的功能是按下列公式編寫(xiě)求積分余弦函數(shù)值,當(dāng)通項(xiàng)的絕對(duì)值小于10 時(shí)停止計(jì)算,請(qǐng)完善本程序。(提示:函數(shù)fact是用遞歸求階乘。)f(x)=ln
2021-07-20
[填空題] 本程序的功能是按下列公式編寫(xiě)求積分余弦函數(shù)值,當(dāng)通項(xiàng)的絕對(duì)值小于10 時(shí)停止計(jì)算,請(qǐng)完善本程序。(提示:函數(shù)fact是用遞歸求階乘。)f(x)=lnx+ , x>0 Option Explicit Private Sub Command1_Click()Dim x As Single,y As SingleDim k As Integer,tx As Singlex=Val(Text1.Text)y=Log(x)Do k=k+1 tx=___(16)___ y=y+txLoop while ___(17)___Text2.Text=Format(y,"0.#######") End Sub Private Function fact(ByVal n As Integer)As LongIf n
正確答案:(-1)^k*x^(2*k)/(2*k*fact(2*k))Abs(tx)>=10^-5N*fact(n-1)
詞條內(nèi)容僅供參考,如果您需要解決具體問(wèn)題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢(xún)相關(guān)領(lǐng)域?qū)I(yè)人士。