I am looking at a question from an assignment and it asks
So for a.2. Consider 4-digit numbers from 1000 to 9999, inclusive.
- How many are divisible by 5 ?
- How many are divisible by 9 ?
- How many are divisible by both 5 and 9 ?
- How many are divisible by either 5 or 9 ?
If it is divisible by 5 it ends with either 0 or 5.
so 2 out of the 10 possible last digits would be ones divisible by 5.
and there would be 899 groups of these 10 last digit numbers.
would 1798 be divisible by 5?
Sorry but my math intuition is so bad LOL.
Ummm by the theory of inclusion-exclusion would 3 not be....
(9999/5-999/5)+(9999/9-999/9)-(9999/45-999/45)
basically the sum of the two sets of numbers divisible by 5 and 9 minus the sum of numbers divisble by both 9 and 5?
EDIT!!
NVM that would be "numbers that are divisble by 9 or 5", not "both 9 and 5" .