This is in fact a complicated math problem. What you want to do is to find how many trailing ceros does 100! Have with out having to Calculate the number. We know that the only way to get a trailing cero is to multiply a number by 10, or what would be the same, to miltiply it by 5 and 2. So what you want to do here is very easy, you need to find how many 2 and fives are there from 2-100. At last you would just have to check if you have more 2s or more 5s because you want to return only the smaller number. Your code would look something like this:
two = five = 0;
For(i=0;i<101;i++)
while(i%2==0)
two++;
i=i/2;
while(i%5==0)
five++;
i=i/5;
if(two