/**
 * This exercise is aimed to check if any number in the given range falls within the range specified by the physician
 * but does not exist in their membership list.
 *
 * @param rangeStart an integer representing the start value of the range (inclusive)
 * @param rangeEnd an integer representing the end value of the range (exclusive)
 * @param membershipList a list of integers representing the physician's membership numbers
 * @return A list of numbers that fall within the given range but are not present in the membership list.
 */
fun rangeNotInMembership(rangeStart: Int, rangeEnd: Int, membershipList: List<Int>): List<Int> {

    val notInMembershipList = mutableListOf<Int>()
    
    for (number in rangeStart until rangeEnd) {
        if (number !in membershipList) {
            notInMembershipList.add(number)
        }
    }
    
    return notInMembershipList
}

// Example usage
// val result = rangeNotInMembership(1, 10, listOf(2, 4, 6, 8))
/**
 * This exercise is aimed to check if any number in the given range falls within the range specified by the physician
 * but does not exist in their membership list.
 *
 * @param rangeStart an integer representing the start value of the range (inclusive)
 * @param rangeEnd an integer representing the end value of the range (exclusive)
 * @param membershipList a list of integers representing the physician's membership numbers
 * @return A list of numbers that fall within the given range but are not present in the membership list.
 */
fun rangeNotInMembership(rangeStart: Int, rangeEnd: Int, membershipList: List<Int>): List<Int> {
/**
 * This exercise is aimed to check if any number in the given range falls within the range specified by the physician
 * but does not exist in their membership list.
 *
 * @param rangeStart an integer representing the start value of the range (inclusive)
 * @param rangeEnd an integer representing the end value of the range (exclusive)
 * @param membershipList a list of integers representing the physician's membership numbers
 * @return A list of numbers that fall within the given range but are not present in the membership list.
 */
fun rangeNotInMembership(rangeStart: Int, rangeEnd: Int, membershipList: List<Int>): List<Int> {

    val notInMembershipList = mutableListOf<Int>()
    
    for (number in rangeStart until rangeEnd) {
        if (number !in membershipList) {
            notInMembershipList.add(number)
        }
    }
    
    return notInMembershipList
}

// Example usage
// val result = rangeNotInMembership(1, 10, listOf(2, 4, 6, 8))