How many numbers are there between 100 to 1000 such that at least one of their digit is 7 ?

between 100 and 1000 means that it is three digit.

__CASE1:__

when only one digit is 7:

i)when the ones place is 7

it can be done in 8 * 9 * 1 ways

= 72

ii}when the tene place is 7

it can be done in 8*9*1 ways again

= 72 ways

iii) when hundreds place is 7;

it can be done in 9*9 ways

=81 ways

thus when only one digit is 7, it can be done in 72 + 72 +81 ways

=225 ways

__CASE2:__ when two digits are 7

i)when ones and tens place is 7,

it can be done in 8 ways

ii)when hundreds and tens place is 7,

it can be one in 9 ways

iii)when ones and hundreds is 7,

it can be done in 9 ways

total of 26 ways

__CASE3__; when all three digits are 7

only 1 is possible

thus total no of ways; 225 +26 +1

= 252 ways!

**
**