用VB程序写出计算s=1!+2!+3!+…+50!的值.

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 19:59:43
用VB程序写出计算s=1!+2!+3!+…+50!的值.
x){>eEOw?m}׋u ^lkmmaY-O$铮IΆL2KRKssRs254*\2s<|ua,[~PVP!$_"OQ0J(dA$`],S, KQfV(ܚWTWt~qAb( 

用VB程序写出计算s=1!+2!+3!+…+50!的值.
用VB程序写出计算s=1!+2!+3!+…+50!的值.

用VB程序写出计算s=1!+2!+3!+…+50!的值.
Private Sub Command2_Click()
Dim I As Long,S As Long
For I = 1 To 100
If I Mod 2 = 0 Then
S = S - I
Else
S = S + I
End If
Next
Print S
End Sub