Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- long long fact(long long n)
- {
- if(n==0)
- return 1;
- else
- return (n*fact(n-1));
- }
- int main()
- {
- long long n;
- scanf("%lld",&n);
- printf("%lld",fact(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement