5 XP challenge

Count Divisible Values

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Count integers in the inclusive range low..high that are divisible by divisor. low and high are 0 to 30 with low <= high; divisor is 1 to 10.

Examples

InputReturn
low = 2, high = 10, divisor = 3

count: 0 → 1 → 2 → 3. The result is 3.

3
low = 0, high = 0, divisor = 3

count: 0 → 1. The result is 1.

1

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.