question

Given an integer, write a function to find the number of trailing zeros of its factorial.

ex. factorialZeroCount(10)

10! = 3,628,800

returns: 2

ex 2. factorialZeroCount(27)

27! = 10,888,869,450,418,352,160,768,000,000

returns: 6

ex. factorialZeroCount(10)

10! = 3,628,800

returns: 2

ex 2. factorialZeroCount(27)

27! = 10,888,869,450,418,352,160,768,000,000

returns: 6

Which two single-digit numbers multiplied with each other will result in a zero.

Trailing zeros are formed when a multiple of 5 is multiplied with a multiple of 2. The number of 2's in the factorial product is abundant and thus we will care only about the number of multiples of fives.

For example, 27 has five 5's: 5, 10, 15, 20, 25

In addition, 27 contains one multiple of 5: 25

In total, five 5's + one 25 = six zeros

See here more information on trailing zeros.

For example, 27 has five 5's: 5, 10, 15, 20, 25

In addition, 27 contains one multiple of 5: 25

In total, five 5's + one 25 = six zeros

```
```**factorialZeroCount**(int n)

int powerFive = 1;

int count = 0;

**while** (powerFive <= n)

powerFive *= 5;

count += floor(n/powerFive);

**return** count;

See here more information on trailing zeros.