There are 10 possible digits.
There are 5 position.
So since we cannot repeat same digital, there is 10 possible digits for first position.
We selected one. Now move to second position. We already selected one digit so now there are 9 possible digits. Just select one.
Now move to third position. Again, we already selected another digit so now there are 8 possible digits for third position.
Repeat until you run out of position.
So that would be 10·9·8·7·6 = 30240
There are 30240 possible codes.
Hope this helps.