根据公式e=1+1/1!+1/2!+1/3!+...,求e的近似值,精度要求为10-6.

根据公式e=1+1/1!+1/2!+1/3!+...,求e的近似值,精度要求为10-6.
vc++
数学人气:573 ℃时间:2020-04-14 11:43:54
优质解答
Option ExplicitPrivate Sub Command1_Click()Dim e0 As Double,e1 As Double,k As Integere0 = 0:e1 = 1:k = 1While e1 - e0 > 0.000001e0 = e1e1 = e1 + GetResult(k)k = k + 1WendPrint e1End SubFunction GetRes...
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版