Hey, I have been programming for a while now and have made a simple program to find the Z function of a number, which counts the number of zeros obtained at the end of a factorial of a certain number. For example, 3628800 is the factorial of 10, so the Z would be 2.
The program works fine up to about 17, where the factorial jumps down to negatives and messes up the program. Also, after a a while, everything falls to zero, leaving you with a final result of 1 for any input higher than 33.