/**
 * This function takes two integers as arguments: start and end.
 * It finds all prime numbers within the range of start and end (inclusive).
 * Returns a list of prime numbers.
 *
 * @param start the starting number of the range
 * @param end the ending number of the range
 * @return a list of prime numbers within the range of start and end
 */
fun findPrimes(start: Int, end: Int): List<Int> {

    val primes = mutableListOf<Int>()

    for (num in start..end) {
        var isPrime = true
        var divisor = 2

        while (divisor * divisor <= num) {
            if (num % divisor == 0) {
                isPrime = false
                break
            }
            divisor++
        }

        if (isPrime) {
            primes.add(num)
        }
    }

    return primes
}
/**
 * This function takes two integers as arguments: start and end.
 * It finds all prime numbers within the range of start and end (inclusive).
 * Returns a list of prime numbers.
 *
 * @param start the starting number of the range
 * @param end the ending number of the range
 * @return a list of prime numbers within the range of start and end
 */
fun findPrimes(start: Int, end: Int): List<Int> {
/**
 * This function takes two integers as arguments: start and end.
 * It finds all prime numbers within the range of start and end (inclusive).
 * Returns a list of prime numbers.
 *
 * @param start the starting number of the range
 * @param end the ending number of the range
 * @return a list of prime numbers within the range of start and end
 */
fun findPrimes(start: Int, end: Int): List<Int> {

    val primes = mutableListOf<Int>()

    for (num in start..end) {
        var isPrime = true
        var divisor = 2

        while (divisor * divisor <= num) {
            if (num % divisor == 0) {
                isPrime = false
                break
            }
            divisor++
        }

        if (isPrime) {
            primes.add(num)
        }
    }

    return primes
}