Final answer:
Numbers divisible by 5: There are 20 numbers (5, 10, 15, ..., 100).
Numbers divisible by 8: There are 12 numbers (8, 16, 24, ..., 96).
There are 30 numbers between 1 and 100 that are divisible by 5 or 8.
Step-by-step explanation:
To calculate how many numbers between 1 and 100 are divisible by 5 or 8, we use the principle of inclusion-exclusion. First, we find how many numbers are divisible by 5, then how many are divisible by 8, and then we subtract the numbers that are divisible by both 5 and 8 since those are counted twice.
Numbers divisible by 5: There are 20 numbers (5, 10, 15, ..., 100).
Numbers divisible by 8: There are 12 numbers (8, 16, 24, ..., 96).
To find the numbers divisible by both 5 and 8 (which is the same as being divisible by 40), there are 2 such numbers (40 and 80).
Using the inclusion-exclusion principle, we get:
Total = Numbers divisible by 5 + Numbers divisible by 8 - Numbers divisible by both 5 and 8
Total = 20 + 12 - 2 = 30.
Therefore, there are 30 numbers between 1 and 100 that are divisible by 5 or 8.