Skip to content

Instantly share code, notes, and snippets.

@oppahero
Created March 21, 2019 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/dd22f2ffb72b2559a7d87bb8c7d111f5 to your computer and use it in GitHub Desktop.
Save oppahero/dd22f2ffb72b2559a7d87bb8c7d111f5 to your computer and use it in GitHub Desktop.
int public static Operaciones.factorial (int n)
int factorial = 1;
if (n < 1) return 0;  //El número debe ser positivo mayor a cero.
for (int i=1; i <= n ; i++)
factorial = factorial *1 ;
return factorial;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment