Created
August 13, 2019 09:43
-
-
Save glukianets/3a0f88ffd2f7733c6d7f37e645daf099 to your computer and use it in GitHub Desktop.
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
// Code golf: print factorial value of a highest digit in a number, function signature: | |
// int fact(int n) | |
int fact(int n) {return n>0?MAX(n%10*fact(n%10-1),fact(n/10)):1;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment