求 VB s = 1 + 2!+ 3!+ 4!+ …… + 10!的值

来源:百度知道 编辑:UC知道 时间:2024/05/31 01:19:26
VB程序编写
我自己也研究出来了 呵呵 还是感谢各位
Dim a%, b#, s#, n#
a = 1: s = 0: b = 1
For a = 1 To 10
n = a * b
b = n
s = s + n

Next a

y=0
for i = 1 to 10
x=1
for j = 1 to i
x=x*j
next j
y=x+y
next i

Private Sub Form_Activate()
Dim i As Integer, s As Long, ss As Long
s = 0: ss = 1
For i = 1 To 10
    ss = ss * i
    s = s + ss
Next i
Print s
End Sub

上面人太厉害了。我还是自己撤销回复吧。。。。唉~~~