Consider the set of integers between $1000$ and $9 999$ inclusive. How many integers in this set:
(i) are divisible by $2$?
(ii) are divisible by $3$?
(iii) are divisible by $2$ and $3$?
What I've tried so far:
(i) $\frac{9999-1000}{2} = 4499.5$
i.e. $4499$ (but since it's inclusive of $1000$), $4499 + 1 = 4500$.
(ii)$\frac{9999-1000}{3} = 2999.66\dots$
i.e. $2999$ (but since it's inclusive of $9999$), $2999+1 = 3000.$
I'm sure this logic/method of solving this question is wrong, and have come across many variations of this problem in exams before but do not know the reasoning behind solving it.
What are the steps for approaching such problems? Thanks!