What's Here?
- Members: 244,212
- Replies: 692,966
- Topics: 113,134
- Snippets: 3,863
- Tutorials: 935
- Total Online: 1,491
- Members: 86
- Guests: 1,405
|
Gets the factorial of a given double using a recursive function
|
Submitted By: nofear217
|
|
Rating:
 
|
|
Views: 1,354 |
Language: VB.NET
|
|
Last Modified: July 22, 2008 |
Snippet
''' <summary>
''' Get the factorial of a given number
''' </summary>
''' <param name="number">The number that you want the factorial of</param>
''' <returns>The factorial of a given number</returns>
''' <remarks></remarks>
Private Function Factorial(ByVal number As Double) As Double
If number <= 1 Then
Return (1)
Else
Return number * Factorial(number - 1)
End If
End Function
Copy & Paste
|
|
|
Be Social
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|