Last active
April 25, 2020 14:49
-
-
Save m-primo/56bed1cb0646144ef76a2eec49255ac3 to your computer and use it in GitHub Desktop.
factorial in c
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 factorial(int i) { | |
if(i <= 1) return 1; | |
return i * factorial(i - 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment