[填空題] 本程序的功能是按公式求S的近似值(計算到第n項的絕對值小于等于10^-7為止)。S=x- + * +(-1) *請完善本程序。Option Expl
2021-07-20
[填空題] 本程序的功能是按公式求S的近似值(計算到第n項的絕對值小于等于10^-7為止)。S=x- + * +(-1) *請完善本程序。Option ExplicitPrivate Sub Command1_Click()Dim x As Single,n As Single,T As Single,S As Singlex=Val(Text1)S=xDo()T=afun(x,n)S=S+TLoop Until ()Text2=Format(S,"0.#######")End SUbPrivate Function afun(x As Single,n As Single)As SingleDim i As Single,p As SingleP=1For i=1 To np= ()Next iafun=(-1)^n*p*x^(2*n+1)/(2*n+1)End Function
正確答案:n=n+1;abs(t)
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。