Help On Factorial

hi guys…When ever i try to find 8 factorial on turbo c…it gives me a negative value…(-25216)
it works well till 7 factorial…why so?..and how can i remove this error…and use to find factorial of large numbers?

read this Tutorial for Factorials

For such small values you can use long long int.

This should help:

When you are done reading, you can try this problem:

Happy coding. :slight_smile: