Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement