Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. // Code golf: print factorial value of a highest digit in a number, function signature:
  2. // int fact(int n)
  3.  
  4. 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