/**
 * This exercise requires you to create a list with a specified number of elements,
 * where each element is the result of multiplying the initial value by its position in the list.
 *
 * For example, if numElements is 5 and initialValue is 3, the resulting list should be [0, 3, 6, 9, 12].
 *
 * Your task is to complete the code below to solve this exercise.
 */
fun createList(numElements: Int, initialValue: Int): List<Int> {

    // Initialize an empty list
    val result = mutableListOf<Int>()

    // Loop through the range from 0 to numElements
    for (i in 0 until numElements) {
        // Multiply the initial value by the position and add it to the list
        result.add(initialValue * i)
    }

    return result
}
/**
 * This exercise requires you to create a list with a specified number of elements,
 * where each element is the result of multiplying the initial value by its position in the list.
 *
 * For example, if numElements is 5 and initialValue is 3, the resulting list should be [0, 3, 6, 9, 12].
 *
 * Your task is to complete the code below to solve this exercise.
 */
fun createList(numElements: Int, initialValue: Int): List<Int> {
/**
 * This exercise requires you to create a list with a specified number of elements,
 * where each element is the result of multiplying the initial value by its position in the list.
 *
 * For example, if numElements is 5 and initialValue is 3, the resulting list should be [0, 3, 6, 9, 12].
 *
 * Your task is to complete the code below to solve this exercise.
 */
fun createList(numElements: Int, initialValue: Int): List<Int> {

    // Initialize an empty list
    val result = mutableListOf<Int>()

    // Loop through the range from 0 to numElements
    for (i in 0 until numElements) {
        // Multiply the initial value by the position and add it to the list
        result.add(initialValue * i)
    }

    return result
}