Created
May 31, 2020 11:24
-
-
Save Ch-sriram/38107caae8ddecc6e29559cfc122a0eb to your computer and use it in GitHub Desktop.
Given N, return N! ["N factorial"] [Naive Solution]
This file contains hidden or 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
| int fact(int n) { | |
| if (n==0) return 1; | |
| return n * fact(n-1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment