/**
 * Find the common numbers between two given lists.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list containing the numbers common to both lists.
 *
 * Example:
 * findCommonNumbers(listOf(1, 2, 3, 4, 5), listOf(3, 4, 5, 6, 7)) // [3, 4, 5]
 * findCommonNumbers(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()
    for (number1 in numbers1) {
        if (number1 in numbers2) {
            commonNumbers.add(number1)
        }
    }
    return commonNumbers
}
/**
 * Find the common numbers between two given lists.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list containing the numbers common to both lists.
 *
 * Example:
 * findCommonNumbers(listOf(1, 2, 3, 4, 5), listOf(3, 4, 5, 6, 7)) // [3, 4, 5]
 * findCommonNumbers(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * Find the common numbers between two given lists.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list containing the numbers common to both lists.
 *
 * Example:
 * findCommonNumbers(listOf(1, 2, 3, 4, 5), listOf(3, 4, 5, 6, 7)) // [3, 4, 5]
 * findCommonNumbers(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun findCommonNumbers(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()
    for (number1 in numbers1) {
        if (number1 in numbers2) {
            commonNumbers.add(number1)
        }
    }
    return commonNumbers
}