<s>[INST] What is the last nonzero digit at the end of 10!? What is the last nonzero digit at the end of $10!$ ? What is the last nonzero digit at the end
of $100!$ ? What is the last nonzero digit at the end of $1,000,000!$?
Is there a formula to find out the pattern?
 [/INST] For $10!$:
The last non-zero digit is formed as the product of the digits in the unit places (note that $2\cdot 5$ has to be left out):
$$3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9 \equiv 8 \mbox{ mod } 10 \rightarrow \mbox{last non-zero digit: }8$$
For $100!$:
Here the last non-zero digit is formed by $10$ blocks of $(3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9)$:
$$(3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9)^{10} \equiv 8^{10} \equiv 4 \mbox{ mod } 10 \rightarrow \mbox{last non-zero digit: }4$$
For $1000000!$:
Here you have $10^5$ blocks of last digits $(3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9)$:
$$(3 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9)^{10^5} \equiv 8^{10 \cdot 10 \cdot 10 \cdot 10 \cdot 10 } \equiv 4^{10 \cdot 10 \cdot 10 \cdot 10} \equiv \ldots \equiv 6 \mbox{ mod } 10 \rightarrow \mbox{last non-zero digit: }6$$
</s>