/**
 * Write a function that multiplies all the numbers within a specified range by a given factor.
 * The function should take three arguments: start, end, and factor.
 * The start argument indicates the starting number of the range (inclusive),
 * the end argument indicates the ending number of the range (exclusive),
 * and the factor argument is the number to multiply each element in the range by.
 *
 * Example usage:
 * multiplyRange(1, 5, 2)
 * Output: [2, 4, 6, 8]
 *
 * multiplyRange(5, 10, 3)
 * Output: [15, 18, 21, 24, 27]
 */
fun multiplyRange(start: Int, end: Int, factor: Int): List<Int> {

    val result = mutableListOf<Int>()
    for (number in start until end) {
        result.add(number * factor)
    }
    return result
}
/**
 * Write a function that multiplies all the numbers within a specified range by a given factor.
 * The function should take three arguments: start, end, and factor.
 * The start argument indicates the starting number of the range (inclusive),
 * the end argument indicates the ending number of the range (exclusive),
 * and the factor argument is the number to multiply each element in the range by.
 *
 * Example usage:
 * multiplyRange(1, 5, 2)
 * Output: [2, 4, 6, 8]
 *
 * multiplyRange(5, 10, 3)
 * Output: [15, 18, 21, 24, 27]
 */
fun multiplyRange(start: Int, end: Int, factor: Int): List<Int> {
/**
 * Write a function that multiplies all the numbers within a specified range by a given factor.
 * The function should take three arguments: start, end, and factor.
 * The start argument indicates the starting number of the range (inclusive),
 * the end argument indicates the ending number of the range (exclusive),
 * and the factor argument is the number to multiply each element in the range by.
 *
 * Example usage:
 * multiplyRange(1, 5, 2)
 * Output: [2, 4, 6, 8]
 *
 * multiplyRange(5, 10, 3)
 * Output: [15, 18, 21, 24, 27]
 */
fun multiplyRange(start: Int, end: Int, factor: Int): List<Int> {

    val result = mutableListOf<Int>()
    for (number in start until end) {
        result.add(number * factor)
    }
    return result
}