1个回答
展开全部
Private Sub Command1_Click()
Dim i As Integer, n As Integer
Dim sum1 As Long As Long
n=inputbox("请输入n的值")
sum1 = 1
For i = 1 To n
sum1 = sum1 * i
Next i
Label1.Caption = Label1.Caption + Str(sum1)
End Sub
需要一个botton 和一个lable
Dim i As Integer, n As Integer
Dim sum1 As Long As Long
n=inputbox("请输入n的值")
sum1 = 1
For i = 1 To n
sum1 = sum1 * i
Next i
Label1.Caption = Label1.Caption + Str(sum1)
End Sub
需要一个botton 和一个lable
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询