/**
 * Gets the age range and excluded ages from the user, and returns the list of valid animals.
 */
fun getAnimals(): List<String> {

    println("Welcome to the veterinarian records!")

    print("Enter the start age of the range: ")
    val startAge = readLine()!!.toInt()

    print("Enter the end age of the range: ")
    val endAge = readLine()!!.toInt()

    val excludedAges = mutableListOf<Int>()
    print("Enter the number of ages to exclude: ")
    val numExcludedAges = readLine()!!.toInt()

    for (i in 1..numExcludedAges) {
        print("Enter the age to exclude: ")
        val age = readLine()!!.toInt()
        excludedAges.add(age)
    }

    return listOf("dog", "cat", "rabbit") // Replace with actual logic to determine valid animals
}
/**
 * Gets the age range and excluded ages from the user, and returns the list of valid animals.
 */
fun getAnimals(): List<String> {
/**
 * Gets the age range and excluded ages from the user, and returns the list of valid animals.
 */
fun getAnimals(): List<String> {

    println("Welcome to the veterinarian records!")

    print("Enter the start age of the range: ")
    val startAge = readLine()!!.toInt()

    print("Enter the end age of the range: ")
    val endAge = readLine()!!.toInt()

    val excludedAges = mutableListOf<Int>()
    print("Enter the number of ages to exclude: ")
    val numExcludedAges = readLine()!!.toInt()

    for (i in 1..numExcludedAges) {
        print("Enter the age to exclude: ")
        val age = readLine()!!.toInt()
        excludedAges.add(age)
    }

    return listOf("dog", "cat", "rabbit") // Replace with actual logic to determine valid animals
}