VB程序中怎么求阶乘?
VB程序中怎么求阶乘?
日期:2022-04-03 06:15:05 人气:1
Private Sub Command1_Click()
Dim i, b As Integer
Dim a As Double
a = 1
For i = 1 To b
a = i * a
Next i
'a为b的阶乘
Text1.Text = a
End Sub
Dim i, b As Integer
Dim a As Double
a = 1
For i = 1 To b
a = i * a
Next i
'a为b的阶乘
Text1.Text = a
End Sub