Monday 7 July 2014

Factorial





Code:
Sub fact()
Dim f, i, fac As Long
f = Val(Text1.Text)
fac = 1
For i = 1 To f
fac = fac * i
Next i
Text2.Text = fac
End Sub

Private Sub Command1_Click()
fact
End Sub


Private Sub Command2_Click()
Text1.Text = Clear
Text2.Text = Clear
End Sub

1 comment:

  1. factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
    factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.

    ReplyDelete