VF循环程序设计 DO WHILE

问题描述:

VF循环程序设计 DO WHILE
求 e=1+1/1!+ 1/2!+ ...+ 1/n!(要求1/n!

clear
set talk off
e=1
n=1
p=1
do while 1/p>=10^(-6)
e=e+1/p
n=n+1
p=p*n
enddo
?"e=",e
set talk on
return