/**
 * This function finds all the numbers within a given limit that are divisible by n.
 *
 * @param n An integer representing the number to divide by.
 * @param limit An integer representing the upper limit to search for divisible numbers.
 * @return A list of integers with all the numbers between 1 and the limit that are divisible by n.
 *
 * Example:
 * findDivisibleByN(3, 10) returns [3, 6, 9]
 */
fun findDivisibleByN(n: Int, limit: Int): List<Int> {

    val divisibleNumbers = mutableListOf<Int>()
    var currentNumber = 1

    while (currentNumber <= limit) {
        if (currentNumber % n == 0) {
            divisibleNumbers.add(currentNumber)
        }
        currentNumber++
    }

    return divisibleNumbers
}
/**
 * This function finds all the numbers within a given limit that are divisible by n.
 *
 * @param n An integer representing the number to divide by.
 * @param limit An integer representing the upper limit to search for divisible numbers.
 * @return A list of integers with all the numbers between 1 and the limit that are divisible by n.
 *
 * Example:
 * findDivisibleByN(3, 10) returns [3, 6, 9]
 */
fun findDivisibleByN(n: Int, limit: Int): List<Int> {
/**
 * This function finds all the numbers within a given limit that are divisible by n.
 *
 * @param n An integer representing the number to divide by.
 * @param limit An integer representing the upper limit to search for divisible numbers.
 * @return A list of integers with all the numbers between 1 and the limit that are divisible by n.
 *
 * Example:
 * findDivisibleByN(3, 10) returns [3, 6, 9]
 */
fun findDivisibleByN(n: Int, limit: Int): List<Int> {

    val divisibleNumbers = mutableListOf<Int>()
    var currentNumber = 1

    while (currentNumber <= limit) {
        if (currentNumber % n == 0) {
            divisibleNumbers.add(currentNumber)
        }
        currentNumber++
    }

    return divisibleNumbers
}