Advertisement
Riz1Ahmed

Find n! Factorial

Feb 19th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. #include <cstdio>
  2. #define u64 unsigned long long int
  3. u64 n=6;
  4. u64 fac(u64 n) {
  5.     if (n==1) return 1;
  6.     n*=fac(n-1);
  7. }
  8. int main(){
  9.     n*=fac(n-1);
  10.     printf("%llu\n",n);
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement