Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int my_fact(int n){
- if (n < 0){
- throw new System.ArgumentException("Il n'existe pas de factorielle de nombres négatifs");
- }else if (n > 0){
- return (n * my_fact(n - 1));
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement