Hi all,
such as:
Public Function Factorial(N As Integer) As Integer If N <= 1 Then Factorial = 1 Else Factorial = Factorial(N - 1) * N End If End Function Sub res() Debug.Print Factorial(4) End Sub
Its principle is to perform what,why the output is 24.
thanks!
Kenny Tangnde
03-Nov-2011Hi Haider,
sorry,i know,thanks for your help.
Anonymous User
03-Nov-2011Hi Aken,
This is not a class room where you will get the code explained.
Here, you can discuss your problem you are getting in your project or if you are stuck somewhere in your code. By this way experts here stop looking at your problem and you won't get your problem solved.
So, please ask only relavent questions.
By the way, the above code is calculating the factorial of 4.
i.e. 4*3*2*1
Google for detailed information about Recursion.
Hope you will understand and won't repeat your mistakes again.
Thanks