[Math] How many 8 digit numbers are there with repetition allowed

combinatorics

I know this is a basic question but I had a doubt. To get all 8 digit numbers, with or without repetition, we will have ten choices of digits for the last 7 digits and 9 choices from digits 1 to 9 for first digit as if it's zero it becomes a seven digit number. So all such numbers should be 9*10 ^7. Am I right ? I saw an answer somewhere where they said it was 10^8. Please explain if I am going wrong somewhere. Thanks !

Best Answer

You are right. Here's another way to see it. The 8 digit numbers are those from $10^7$ to $10^8-1$ inclusive, so the number of them is $10^8-10^7=9\times 10^7$.