Private Sub Command1_Click()
Dim j As Integer, k As Integer
Dim sum As Long, jc As Long, fh As Integer
jc = 1: fh = 1
For j = 1 To 10
For k = 1 To j
jc = jc * k
Next
sum = sum + jc * fh
fh = -fh
jc = 1
Next
MsgBox sum
End Sub
Private Sub Command1_Click()
j = 1
For i = 1 To 10
j = j * i
s = s - j * (-1) ^ i
Next
Print s
End Sub
Private Sub Command1_Click()
For i = 1 To 10
Sum = Sum - jiecheng(i)
Next
Print Sum
End Sub
Function jiecheng(num)
jiecheng = 1
For i = 1 To num
jiecheng = jiecheng * i
Next
End Function