/**
 * Calculate the sum of all multiples of a given divisor within a specific range.
 *
 * @param start The starting value of the range (inclusive).
 * @param end The ending value of the range (exclusive).
 * @param divisor The number to find multiples of.
 * @return The sum of all multiples of the divisor within the range.
 *
 * Example:
 * sumOfMultiples(1, 10, 3) returns 18
 */
fun sumOfMultiples(start: Int, end: Int, divisor: Int): Int {

    var totalSum = 0
    for (i in start until end) {
        if (i % divisor == 0) {
            totalSum += i
        }
    }
    return totalSum
}
/**
 * Calculate the sum of all multiples of a given divisor within a specific range.
 *
 * @param start The starting value of the range (inclusive).
 * @param end The ending value of the range (exclusive).
 * @param divisor The number to find multiples of.
 * @return The sum of all multiples of the divisor within the range.
 *
 * Example:
 * sumOfMultiples(1, 10, 3) returns 18
 */
fun sumOfMultiples(start: Int, end: Int, divisor: Int): Int {
/**
 * Calculate the sum of all multiples of a given divisor within a specific range.
 *
 * @param start The starting value of the range (inclusive).
 * @param end The ending value of the range (exclusive).
 * @param divisor The number to find multiples of.
 * @return The sum of all multiples of the divisor within the range.
 *
 * Example:
 * sumOfMultiples(1, 10, 3) returns 18
 */
fun sumOfMultiples(start: Int, end: Int, divisor: Int): Int {

    var totalSum = 0
    for (i in start until end) {
        if (i % divisor == 0) {
            totalSum += i
        }
    }
    return totalSum
}