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: Tutorial for Small Factorials | CodeChef

When you are done reading, you can try this problem: FCTRL2 Problem - CodeChef

Happy coding. :slight_smile: