vb如何阶乘 我的阶乘老是0 求高手解答
一个text输入值然后点击按钮标签显示数值PrivateSubCommand1_Click()DimtAsLongDimaAsLongDimcAsLonga=Val(Te...
一个text输入值 然后点击按钮 标签显示数值
Private Sub Command1_Click()
Dim t As Long
Dim a As Long
Dim c As Long
a = Val(Text1.Text)
For t = 1 To a Step 1
c = c * t
Next t
Label1.Caption = c
End Sub 展开
Private Sub Command1_Click()
Dim t As Long
Dim a As Long
Dim c As Long
a = Val(Text1.Text)
For t = 1 To a Step 1
c = c * t
Next t
Label1.Caption = c
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询