用vb程序计算1!+2!+3!+4!+5!的值

2024-12-05 06:46:27
推荐回答(1个)
回答1:

Private Sub Command1_Click()

s = 0

t = 1

For i = 1 To 5

t = t * i

s = s + t

Next i

Print "1!+2!+3!+4!+5!="; s

End Sub