The total number of combinations without restrictions is
10 * 10 * 10 * 10 * 10 = 100000
Problem A
10 * 9 * 8 * 7 * 6 = 30240
the number of ways the combination can be set up with no repetition.
The probability of such an event is P = 30240 / 100000 = 0.3024
Problem B
The number of ways that can be done with repetition and no zeros is
9 * 9 * 9 * 9 * 9 = 59049
The probability of such an event is
P = 59049 / 100000 = 0.59049