小明编写了一个VB程序来计算e的近似值,功能为在文本框Text1中输入公式n值,单击“计算”命令按钮Command1,在标签Labe2中显示计算结果,程序运行界面如图所示。
Private Sub Command1__Click()
Dim I As Double,p As Double
Dim e As Double
n= ①
e=1
i=1
p=1
Do While i<=n
p= ②
e=e+p
③
Loop
Label2. Caption=“e的值是:”+Str(e)
End Sub
① ② ③