Created
March 3, 2014 18:32
-
-
Save Fhernd/9331482 to your computer and use it in GitHub Desktop.
Clase que contiene el método de cómputo de la función factorial.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClaseFactorial | |
{ | |
public long ComputarFactorial (int numero) | |
{ | |
long factorial = 1; | |
while (n>0) | |
{ | |
factorial = factorial * numero; | |
--numero; | |
} | |
return factorial; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment