Finding the number of trailing zeroes in the factorial of a number has a sequence of 3-4 steps which applies for all number. I will list it down for reference
step 1: Divide the given number by 5, the answer will give you the number of multiples. If it gives you a decimal answer, you can just take the whole number
Step 2: Divide the given number with the next power of 5, that is 25( 5 times 5) , find the number of multiples
Step 3: Divide the given number with the next power of 5, that is 125 (5 times 5 times 5) , find the number of multiples
Step 4:Keep doing this with increasing powers of 5 till the given number becomes lesser than the power of 5
Step 5: Now add all the number of multiples you got at each step
This will give you the number of trailing zeroes for the given number
Let's do this process for the given number 1000
Divide by 5
1000÷5 = 200 multiples
1000 ÷25 = 40 multiples (5² = 25)
1000÷125 = 8 multiples (5³=125)
1000÷ 625 = 1.69.... we take only the whole number so 1 multiple
now the next power is 3125 which cannot divide 1000 so we can stop this process
now add all the multiples
200+40+8+1 = 249
So the factorial of 1000 has 249 trailing zeroes