We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 9: Recursion 3
Day 9: Recursion 3
Sort by
recency
|
1134 Discussions
|
Please Login in order to post a comment
Can you make my Python Code shorter?
javascript
int factorial(int n) { int pro=1; if(n<=0){ return 1; } else{ return n*factorial(n-1); } }
JavaScript
function factorial(n) { if(n === 0){ return 1 } return n * factorial(n-1) }