Let us analyse all numbers from 100 to 200 (both excluded).
Total numbers when unit digit is 2 = 10 {102,112,122, ..., 192}
Total numbers when tens digit is 2 = 10 {120,121,121, ..., 129}
We can see that the there is exactly one number{122} which have both tens and unit digit as 1. So total unique numbers from 100 to 200 (both excluded) which contain at least one 2 digit = 10 + 10 - 1 = 19
From 200 to 299 (both included), all numbers have at least one digit as 2. Total such number = 100.
From 300 to 400, 400 to 500, 500 to 600, 600 to 700 and 700 to 800 we will have 19 number for each pair with at least one 2 digit.
Therefore, total whole numbers between 100 and 800 contain the digit 2 = 100 + 19*6 = 214.
Create a FREE account and get: