/**
 * This function finds all the prime numbers within a given range.
 *
 * @param start The starting value of the range.
 * @param end The ending value of the range.
 * @return A list of prime numbers within the given range.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {

    val primeNumbers = mutableListOf<Int>()

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

        // Check if the current number is divisible by any other number
        for (i in 2..(Math.sqrt(num.toDouble())).toInt()) {
            if (num % i == 0) {
                isPrime = false
                break
            }
        }

        // If the current number is prime, add it to the list
        if (isPrime && num > 1) {
            primeNumbers.add(num)
        }
    }

    return primeNumbers
}
/**
 * This function finds all the prime numbers within a given range.
 *
 * @param start The starting value of the range.
 * @param end The ending value of the range.
 * @return A list of prime numbers within the given range.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {
/**
 * This function finds all the prime numbers within a given range.
 *
 * @param start The starting value of the range.
 * @param end The ending value of the range.
 * @return A list of prime numbers within the given range.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {

    val primeNumbers = mutableListOf<Int>()

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

        // Check if the current number is divisible by any other number
        for (i in 2..(Math.sqrt(num.toDouble())).toInt()) {
            if (num % i == 0) {
                isPrime = false
                break
            }
        }

        // If the current number is prime, add it to the list
        if (isPrime && num > 1) {
            primeNumbers.add(num)
        }
    }

    return primeNumbers
}