Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. long long fac(int n)
  4. {
  5. if(n==0)
  6. {
  7. return 1;
  8. }
  9. long long int fn = n* fac(n-1);
  10. return fn;
  11. }
  12.  
  13.  
  14. int main()
  15. {
  16.  
  17. int n =1;
  18. long long int fn;
  19. fn = fac(n);
  20. printf("%lld\n",fn);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement