Count the numbers

Report a typo

Write a program that reads a, b, and n and outputs how many numbers in the inclusive range from a to b (a < b) are divisible by n.

Note: you can write this program in a more efficient way, that is, without any loops. Think about it after you write the solution with a loop.

Sample Input 1:

10
20
10

Sample Output 1:

2

Sample Input 2:

-10
10
5

Sample Output 2:

5
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic