# The number of numbers lying between 1 and 200 which are divisible by either of 2 , 3 or 5? [duplicate]

The number of numbers lying between 1 and 200 which are divisible by either of two , three or five?

A)numbers divisible by 2: $\frac{200}{2} = 100$

B)numbers divisible by 3: $\frac{200}{3} = 66$

C)numbers divisible by 5: $\frac{200}{5} = 40$

counting twice

AB)numbers divisible by 6: $\frac{200}{6} = 33$

AC)numbers divisible by 10: $\frac{200}{10} = 20$

BC)numbers divisible by 15: $\frac{200}{15} = 13$

counting 3 times

ABC)numbers divisible by 30: $\frac{200}{30} = 6$

Total of numbers = A + B + C - AB - AC - BC + ABC = 100 + 66 + 40 - 33 - 20 - 13 + 6 = 146

• why you don't include the numbers divisible by 7 ? – zeraoulia rafik Jul 6 '15 at 0:49
• Nice example of inclusion-exclusion – Simon S Jul 6 '15 at 0:50
• @zeraouliarafik The question didn't ask about multiples of $7$. – Thomas Andrews Jul 6 '15 at 2:18
• @Conrado costa sir the answer in the book is 145 ? That is why i am getting confused how to approach ? – sushmitha Jul 7 '15 at 5:42