/**
 * This function calculates the projected population growth of a species of animals over a specific period 
 * of time, given the initial population, growth rate, and number of years. The function utilizes a basic loop 
 * syntax and the multiplication assignment operator to update the population for each year.
 *
 * @param population the initial population of the species
 * @param growthRate the annual population growth rate as a decimal
 * @param years the number of years to calculate the population growth
 * @return projected population after the specified number of years
 */
fun calculatePopulationGrowth(population: Int, growthRate: Double, years: Int): Int {

    var updatedPopulation = population
    repeat(years) {
        updatedPopulation = (updatedPopulation * (1 + growthRate)).toInt()
    }
    return updatedPopulation
}
/**
 * This function calculates the projected population growth of a species of animals over a specific period 
 * of time, given the initial population, growth rate, and number of years. The function utilizes a basic loop 
 * syntax and the multiplication assignment operator to update the population for each year.
 *
 * @param population the initial population of the species
 * @param growthRate the annual population growth rate as a decimal
 * @param years the number of years to calculate the population growth
 * @return projected population after the specified number of years
 */
fun calculatePopulationGrowth(population: Int, growthRate: Double, years: Int): Int {
/**
 * This function calculates the projected population growth of a species of animals over a specific period 
 * of time, given the initial population, growth rate, and number of years. The function utilizes a basic loop 
 * syntax and the multiplication assignment operator to update the population for each year.
 *
 * @param population the initial population of the species
 * @param growthRate the annual population growth rate as a decimal
 * @param years the number of years to calculate the population growth
 * @return projected population after the specified number of years
 */
fun calculatePopulationGrowth(population: Int, growthRate: Double, years: Int): Int {

    var updatedPopulation = population
    repeat(years) {
        updatedPopulation = (updatedPopulation * (1 + growthRate)).toInt()
    }
    return updatedPopulation
}