/**
 * This function takes in a list and a number and returns a new list containing only the numbers from the original list
 * that are multiples of the given number.
 *
 * @param lst The list of numbers.
 * @param n The number to find multiples of.
 * @return A new list containing only the numbers that are multiples of the given number.
 *
 * Example:
 * findMultiples(listOf(2, 4, 6, 8, 10), 3) returns [6]
 * findMultiples(listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), 4) returns [4, 8]
 */
fun findMultiples(lst: List<Int>, n: Int): List<Int> {

    val multiples = mutableListOf<Int>()

    for (num in lst) {
        if (num % n == 0) {
            multiples.add(num)
        }
    }

    return multiples
}
/**
 * This function takes in a list and a number and returns a new list containing only the numbers from the original list
 * that are multiples of the given number.
 *
 * @param lst The list of numbers.
 * @param n The number to find multiples of.
 * @return A new list containing only the numbers that are multiples of the given number.
 *
 * Example:
 * findMultiples(listOf(2, 4, 6, 8, 10), 3) returns [6]
 * findMultiples(listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), 4) returns [4, 8]
 */
fun findMultiples(lst: List<Int>, n: Int): List<Int> {
/**
 * This function takes in a list and a number and returns a new list containing only the numbers from the original list
 * that are multiples of the given number.
 *
 * @param lst The list of numbers.
 * @param n The number to find multiples of.
 * @return A new list containing only the numbers that are multiples of the given number.
 *
 * Example:
 * findMultiples(listOf(2, 4, 6, 8, 10), 3) returns [6]
 * findMultiples(listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), 4) returns [4, 8]
 */
fun findMultiples(lst: List<Int>, n: Int): List<Int> {

    val multiples = mutableListOf<Int>()

    for (num in lst) {
        if (num % n == 0) {
            multiples.add(num)
        }
    }

    return multiples
}