/**
 * This function takes a range of numbers as input and returns a list of prime numbers.
 * Prime numbers are numbers that are divisible by 1 and itself only.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {

    val primes = mutableListOf<Int>()  // Initialize an empty list to store the prime numbers

    for (num in start..end) {
        var isPrime = true  // Assume the number is prime initially

        // Check if the number is divisible by any number from 2 to the square root of the number
        for (i in 2..(Math.sqrt(num.toDouble()).toInt() + 1)) {
            if (num % i == 0) {
                isPrime = false  // Number is not prime if it's divisible by any number
                break
            }
        }

        if (isPrime) {
            primes.add(num)  // Append the prime number to the list
        }
    }

    return primes
}
/**
 * This function takes a range of numbers as input and returns a list of prime numbers.
 * Prime numbers are numbers that are divisible by 1 and itself only.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {
/**
 * This function takes a range of numbers as input and returns a list of prime numbers.
 * Prime numbers are numbers that are divisible by 1 and itself only.
 */
fun findPrimeNumbers(start: Int, end: Int): List<Int> {

    val primes = mutableListOf<Int>()  // Initialize an empty list to store the prime numbers

    for (num in start..end) {
        var isPrime = true  // Assume the number is prime initially

        // Check if the number is divisible by any number from 2 to the square root of the number
        for (i in 2..(Math.sqrt(num.toDouble()).toInt() + 1)) {
            if (num % i == 0) {
                isPrime = false  // Number is not prime if it's divisible by any number
                break
            }
        }

        if (isPrime) {
            primes.add(num)  // Append the prime number to the list
        }
    }

    return primes
}