/**
 * A farmer wants to find out which animals are missing from his farm based on the animals reported by his neighbors.
 * Complete the code below to solve the exercise.
 *
 * @param farmAnimals A list of animals on the farmer's farm.
 * @param reportedAnimals A list of animals reported by the neighbors.
 * @return A list of animals that are missing from the farmer's farm.
 */
fun findMissingAnimals(farmAnimals: List<String>, reportedAnimals: List<String>): List<String> {

    val missingAnimals = mutableListOf<String>()

    for (animal in reportedAnimals) {
        // Check if the animal is not present on the farm
        if (animal !in farmAnimals) {
            missingAnimals.add(animal)
            break
        }
    }

    return missingAnimals
}
/**
 * A farmer wants to find out which animals are missing from his farm based on the animals reported by his neighbors.
 * Complete the code below to solve the exercise.
 *
 * @param farmAnimals A list of animals on the farmer's farm.
 * @param reportedAnimals A list of animals reported by the neighbors.
 * @return A list of animals that are missing from the farmer's farm.
 */
fun findMissingAnimals(farmAnimals: List<String>, reportedAnimals: List<String>): List<String> {
/**
 * A farmer wants to find out which animals are missing from his farm based on the animals reported by his neighbors.
 * Complete the code below to solve the exercise.
 *
 * @param farmAnimals A list of animals on the farmer's farm.
 * @param reportedAnimals A list of animals reported by the neighbors.
 * @return A list of animals that are missing from the farmer's farm.
 */
fun findMissingAnimals(farmAnimals: List<String>, reportedAnimals: List<String>): List<String> {

    val missingAnimals = mutableListOf<String>()

    for (animal in reportedAnimals) {
        // Check if the animal is not present on the farm
        if (animal !in farmAnimals) {
            missingAnimals.add(animal)
            break
        }
    }

    return missingAnimals
}