Skip to content

Commit

Permalink
Merge pull request #88 from EnzoRobaina/master
Browse files Browse the repository at this point in the history
Ref Issue #14 | Added recursive factorial in java
  • Loading branch information
ambujraj committed Oct 1, 2018
2 parents 8e0d8ae + a48132c commit dc0e215
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions factorial/Factorial.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class Factorial {
static int factorial(int n) {
if (n == 0) {
return 1;
}
else {
return(n*factorial(n-1));
}
}
}


0 comments on commit dc0e215

Please sign in to comment.