/**
 * This exercise requires the student to write a Kotlin function that performs multiplication using the *= operator
 * and breaks out of the loop based on a given condition.
 *
 * @param numbers A list of numbers.
 * @param target The target value.
 */
fun multiplyAndBreak(numbers: List<Int>, target: Int) {

    // Initialize a variable to hold the result
    var result = 1

    // Iterate through the numbers
    for (num in numbers) {
        // Multiply the result by the current number
        result *= num

        // Check if the result exceeds the target
        if (result > target) {
            break
        }
    }

    println(result)
}
/**
 * This exercise requires the student to write a Kotlin function that performs multiplication using the *= operator
 * and breaks out of the loop based on a given condition.
 *
 * @param numbers A list of numbers.
 * @param target The target value.
 */
fun multiplyAndBreak(numbers: List<Int>, target: Int) {
/**
 * This exercise requires the student to write a Kotlin function that performs multiplication using the *= operator
 * and breaks out of the loop based on a given condition.
 *
 * @param numbers A list of numbers.
 * @param target The target value.
 */
fun multiplyAndBreak(numbers: List<Int>, target: Int) {

    // Initialize a variable to hold the result
    var result = 1

    // Iterate through the numbers
    for (num in numbers) {
        // Multiply the result by the current number
        result *= num

        // Check if the result exceeds the target
        if (result > target) {
            break
        }
    }

    println(result)
}