[填空题] 本程序的功能是按公式求S的近似值(计算到第n项的绝对值小于等于10^-7为止)。S=x- + * +(-1) *请完善本程序。Option ExplicitPrivate Sub Comm

14 查阅

[填空题] 本程序的功能是按公式求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)<=1e-7;p*(2*i-1)/(2*i)

计算机考试