/**
 * A zoologist wants to determine if there are enough animals in the population for a wildlife reserve. The zoologist should make the decision based on the following conditions:
 *
 * - If the total number of lions and elephants is less than 30, return "Low population, we need more animals.".
 * - If the giraffe population is more than double the zebra population, return "Giraffes are dominating, we need to control their population.".
 * - If none of the above conditions are met, return "Population is stable.".
 *
 * @param numLions the number of lions in the population
 * @param numElephants the number of elephants in the population
 * @param numGiraffes the number of giraffes in the population
 * @param numZebras the number of zebras in the population
 * @return a message indicating the status of the animal population
 */
fun animalPopulation(numLions: Int, numElephants: Int, numGiraffes: Int, numZebras: Int): String {

    return when {
        numLions + numElephants < 30 -> "Low population, we need more animals."
        numGiraffes > 2 * numZebras -> "Giraffes are dominating, we need to control their population."
        else -> "Population is stable."
    }
}
/**
 * A zoologist wants to determine if there are enough animals in the population for a wildlife reserve. The zoologist should make the decision based on the following conditions:
 *
 * - If the total number of lions and elephants is less than 30, return "Low population, we need more animals.".
 * - If the giraffe population is more than double the zebra population, return "Giraffes are dominating, we need to control their population.".
 * - If none of the above conditions are met, return "Population is stable.".
 *
 * @param numLions the number of lions in the population
 * @param numElephants the number of elephants in the population
 * @param numGiraffes the number of giraffes in the population
 * @param numZebras the number of zebras in the population
 * @return a message indicating the status of the animal population
 */
fun animalPopulation(numLions: Int, numElephants: Int, numGiraffes: Int, numZebras: Int): String {
/**
 * A zoologist wants to determine if there are enough animals in the population for a wildlife reserve. The zoologist should make the decision based on the following conditions:
 *
 * - If the total number of lions and elephants is less than 30, return "Low population, we need more animals.".
 * - If the giraffe population is more than double the zebra population, return "Giraffes are dominating, we need to control their population.".
 * - If none of the above conditions are met, return "Population is stable.".
 *
 * @param numLions the number of lions in the population
 * @param numElephants the number of elephants in the population
 * @param numGiraffes the number of giraffes in the population
 * @param numZebras the number of zebras in the population
 * @return a message indicating the status of the animal population
 */
fun animalPopulation(numLions: Int, numElephants: Int, numGiraffes: Int, numZebras: Int): String {

    return when {
        numLions + numElephants < 30 -> "Low population, we need more animals."
        numGiraffes > 2 * numZebras -> "Giraffes are dominating, we need to control their population."
        else -> "Population is stable."
    }
}