Private Sub Command1_Click()
Dim s As Integer
Dim n As Integer
Dim i As Integer
n = Val(Text1.Text)
s = 1
For i = 2 To n
s = s * i
Next i
Label1.Caption = Str(n) + "!=" + Str(s)
End Sub
微信扫码预览、分享更方便