visual basic代码哪错了?计算1到10的阶乘和 5
PrivateSubForm_click()DimiAsSingle,zAsSingle,wAsSingle,sAsSinglei=1w=1s=0DoUntili=11z...
Private Sub Form_click()
Dim i As Single, z As Single, w As Single, s As Single
i = 1
w = 1
s = 0
Do Until i = 11
z = 1
Do Until z = i + 1
w = w * z
z = z + 1
Loop
i = i + 1
s = s + w
Loop
Print s
End Sub
啊……我自己想出来了哈哈~不用回答啦! 展开
Dim i As Single, z As Single, w As Single, s As Single
i = 1
w = 1
s = 0
Do Until i = 11
z = 1
Do Until z = i + 1
w = w * z
z = z + 1
Loop
i = i + 1
s = s + w
Loop
Print s
End Sub
啊……我自己想出来了哈哈~不用回答啦! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询