这段代码VB中系统老是自己擅自在print中给i的前面自动加空格,我删了他还是自动加,有办法不加空格吗?
PrivateSubForm_Click()Dimi%,n&,e!i=1n=1e=1Print"e=1";DoWhile1/n>=0.00001'e=1+1/1!+1/2...
Private Sub Form_Click()
Dim i%, n&, e!
i = 1
n = 1
e = 1
Print "e=1";
Do While 1 / n >= 0.00001 'e=1+1/1!+1/2!+....i/n!
n = n * i
e = e + 1 / n
i = i + 1
Print "+1/";i;"!";
Loop
Print "="; e
End Sub 展开
Dim i%, n&, e!
i = 1
n = 1
e = 1
Print "e=1";
Do While 1 / n >= 0.00001 'e=1+1/1!+1/2!+....i/n!
n = n * i
e = e + 1 / n
i = i + 1
Print "+1/";i;"!";
Loop
Print "="; e
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询