/**
 * This function takes a veterinarian's name and a list of animals as arguments.
 *
 * The task is to print the animals' names in reverse order, starting from the last animal.
 *
 * Your task is to complete the missing code below.
 */
fun printAnimals(veterinarian: String, animalList: List<String>) {

    var i = animalList.size - 1
    while (i >= 0) {
        val animal = animalList[i]

        // Print the veterinarian's name and the animal's name
        // Only print the animal's name if it is an even-indexed animal
        if (i % 2 == 0) {
            println("$veterinarian - $animal")
        }

        i--
    }
}
/**
 * This function takes a veterinarian's name and a list of animals as arguments.
 *
 * The task is to print the animals' names in reverse order, starting from the last animal.
 *
 * Your task is to complete the missing code below.
 */
fun printAnimals(veterinarian: String, animalList: List<String>) {
/**
 * This function takes a veterinarian's name and a list of animals as arguments.
 *
 * The task is to print the animals' names in reverse order, starting from the last animal.
 *
 * Your task is to complete the missing code below.
 */
fun printAnimals(veterinarian: String, animalList: List<String>) {

    var i = animalList.size - 1
    while (i >= 0) {
        val animal = animalList[i]

        // Print the veterinarian's name and the animal's name
        // Only print the animal's name if it is an even-indexed animal
        if (i % 2 == 0) {
            println("$veterinarian - $animal")
        }

        i--
    }
}