factorial trailing zeroes Algorithm

The number of trailing zeros in a non-zero base-b integer N equals the exponent of the highest power of b that divides N. For example, in pharmacy, trailing zeros are omitted from dose values to prevent misreading.

factorial trailing zeroes source code, pseudocode and analysis