فاکتوریل به زبان vb6

 Dim a, b, i As Single
Private Sub Command1_Click()
b = 1
Me.Cls
a = InputBox("")
For i = a To 1 Step -1
b = b * i
Next i
Print b
End Sub
Private Sub Form_Load()
b = 1
End Sub