gvij2017
What is wrong if I get same answer with different approach.
First 3 digit integer: 100
Last 3 digit integer : 999
So number divisible by 7 = (999-100)/7 = 128.4
Ignore the digits after decimal.
Answer is 128/900= 32/225
In order to find the required probability, we need (No. of 3-digit multiples of 7) / (Total no. of 3 digit numbers).
The no. of multiples of x within a given range (say, between Min and Max, both included) is not always the quotient of (Max - Min)/x. Specifically, if either Max or Min is perfectly divisible by x (or, for that matter, both are perfectly divisible by x), then the quotient of (Max - Min) / x will give a result which is 1 less than the required number of multiples.
In the above eg, if we were asked to find the probability of a 3 digit number being divisible by 2 or 3 (instead of 7, as asked in this question) then the quotient of (999-100)/2 or (999-100)/3 would give the wrong answer.
Largest 3 digit number divisible by 2 = 998
Smallest 3 digit number divisible by 2 = 100
No. of 3 digit multiples of 2 = [(998-100)/2]+1 = 450
Quotient (999-100)/2 = 449
Largest 3 digit number divisible by 3 = 999
Smallest 3 digit number divisible by 3 = 102
No. of 3 digit multiples of 3 = [(999-102)/3]+1 = 300
Quotient (999-100)/3 = 299
Hope this clarifies.