VF用表单设计的方式 计算e的近似值.其公式为:e=1+1/1!+1/2!+1/3!+…+1/N!,直到1/N!<0.000001为止. 谢谢

如题所述

e=1
i=1
ii=1
do while .t.
e=e+1/ii
if 1/ii<0.000001
exit
endif
i=i+1
ii=ii*i
enddo
?e
温馨提示:答案为网友推荐,仅供参考
相似回答
大家正在搜