/**
 * This exercise requires you to write a block of code that performs the following tasks:
 *
 * 1. Check if num1 and num2 are both even numbers. If any of them is odd, return false.
 * 2. Iterate through the given list of numbers (numList).
 * 3. For each number in numList, check if it is divisible by num1. If not, move to the next number.
 * 4. If a number is divisible by num1, check if it is also divisible by num2. If not, move to the next number.
 * 5. If a number is divisible by both num1 and num2, print the number.
 * 6. Finally, return true if all the numbers in numList have been checked, or false if the process was interrupted.
 *
 * Note: The function does not take any additional arguments.
 */
fun executeCode(num1: Int, num2: Int, numList: List<Int>): Boolean {

    // Check if both num1 and num2 are even numbers
    if (num1 % 2 != 0 || num2 % 2 != 0) {
        return false
    }

    // Iterate through the numbers in numList
    for (num in numList) {
        // Check if the number is divisible by num1
        if (num % num1 != 0) {
            continue
        }

        // Check if the number is divisible by num2
        if (num % num2 == 0) {
            println(num)
        }
    }

    return true
}
/**
 * This exercise requires you to write a block of code that performs the following tasks:
 *
 * 1. Check if num1 and num2 are both even numbers. If any of them is odd, return false.
 * 2. Iterate through the given list of numbers (numList).
 * 3. For each number in numList, check if it is divisible by num1. If not, move to the next number.
 * 4. If a number is divisible by num1, check if it is also divisible by num2. If not, move to the next number.
 * 5. If a number is divisible by both num1 and num2, print the number.
 * 6. Finally, return true if all the numbers in numList have been checked, or false if the process was interrupted.
 *
 * Note: The function does not take any additional arguments.
 */
fun executeCode(num1: Int, num2: Int, numList: List<Int>): Boolean {
/**
 * This exercise requires you to write a block of code that performs the following tasks:
 *
 * 1. Check if num1 and num2 are both even numbers. If any of them is odd, return false.
 * 2. Iterate through the given list of numbers (numList).
 * 3. For each number in numList, check if it is divisible by num1. If not, move to the next number.
 * 4. If a number is divisible by num1, check if it is also divisible by num2. If not, move to the next number.
 * 5. If a number is divisible by both num1 and num2, print the number.
 * 6. Finally, return true if all the numbers in numList have been checked, or false if the process was interrupted.
 *
 * Note: The function does not take any additional arguments.
 */
fun executeCode(num1: Int, num2: Int, numList: List<Int>): Boolean {

    // Check if both num1 and num2 are even numbers
    if (num1 % 2 != 0 || num2 % 2 != 0) {
        return false
    }

    // Iterate through the numbers in numList
    for (num in numList) {
        // Check if the number is divisible by num1
        if (num % num1 != 0) {
            continue
        }

        // Check if the number is divisible by num2
        if (num % num2 == 0) {
            println(num)
        }
    }

    return true
}