Wrong answer error

it is showing me factorial of 100 as 0 but its giving me factorial of 5 correctly.

Hi @anyamaurya, factorial of 100 is a very large number(of the order 10^158 ) that cannot be stored even in long long int. so due to integer overflow u are getting 0 as output . your program will work fine for small inputs but for large inputs one way is to use an array to store individual digits of the result
refer this article for more details : - https://www.geeksforgeeks.org/factorial-large-number/

In case of any doubt feel free to ask :slight_smile:
if you got the answer then mark your doubt as resolved