Let's think about it in groups of 20.
Note, from 1 to 20, 5 numbers are divisible by 4.....4, 8, 12, 16, 20
And since there are 5 "20s" in 100, then 5 X 5 = 25 numbers divisible by 4.
Likewise, there are 4 numbers divisible by 5.......5 , 10 , 15 , 20
And again, since there are 5 "20s" in 100, then 5 x 4 = 20 numbers divsible by 5.
However, we have to subtract out the numbers divisible by both 4 and 5 to prevent "double counting."
These would be 20, 40, 60, 80 and 100.
Thus, we have 25 + 20 - 5 = 40 numbers divisible by 4 or 5 from 1-100, inclusive.