/**
 * This exercise requires you to create a function that takes two parameters (start and stop)
 * and returns a list containing all even numbers between start and stop (inclusive).
 * If the start parameter is greater than the stop parameter, return an empty list.
 *
 * Example:
 * findEvenNumbers(4, 12) -> [4, 6, 8, 10, 12]
 * findEvenNumbers(8, 3) -> []
 *
 * You need to complete the code to solve the exercise.
 */
fun findEvenNumbers(start: Int, stop: Int): List<Int> {

    if (start > stop) {
        return emptyList()
    } else {
        val evenNumbers = mutableListOf<Int>()
        for (num in start..stop) {
            if (num % 2 == 0) {
                evenNumbers.add(num)
            }
        }
        return evenNumbers
    }
}
/**
 * This exercise requires you to create a function that takes two parameters (start and stop)
 * and returns a list containing all even numbers between start and stop (inclusive).
 * If the start parameter is greater than the stop parameter, return an empty list.
 *
 * Example:
 * findEvenNumbers(4, 12) -> [4, 6, 8, 10, 12]
 * findEvenNumbers(8, 3) -> []
 *
 * You need to complete the code to solve the exercise.
 */
fun findEvenNumbers(start: Int, stop: Int): List<Int> {
/**
 * This exercise requires you to create a function that takes two parameters (start and stop)
 * and returns a list containing all even numbers between start and stop (inclusive).
 * If the start parameter is greater than the stop parameter, return an empty list.
 *
 * Example:
 * findEvenNumbers(4, 12) -> [4, 6, 8, 10, 12]
 * findEvenNumbers(8, 3) -> []
 *
 * You need to complete the code to solve the exercise.
 */
fun findEvenNumbers(start: Int, stop: Int): List<Int> {

    if (start > stop) {
        return emptyList()
    } else {
        val evenNumbers = mutableListOf<Int>()
        for (num in start..stop) {
            if (num % 2 == 0) {
                evenNumbers.add(num)
            }
        }
        return evenNumbers
    }
}