/**
 * Calculate the population growth over a certain number of years.
 * @param initialPopulation The initial population size.
 * @param growthRate The annual growth rate as a decimal value.
 * @param years The number of years to calculate the population growth.
 * @return The final population size after the specified number of years.
 */
fun calculatePopulationGrowth(initialPopulation: Int, growthRate: Double, years: Int): Int {

    var currentPopulation = initialPopulation
    var remainingYears = years

    while (remainingYears > 0) {
        currentPopulation += (currentPopulation * growthRate).toInt()
        remainingYears--
    }

    return currentPopulation
}
/**
 * Calculate the population growth over a certain number of years.
 * @param initialPopulation The initial population size.
 * @param growthRate The annual growth rate as a decimal value.
 * @param years The number of years to calculate the population growth.
 * @return The final population size after the specified number of years.
 */
fun calculatePopulationGrowth(initialPopulation: Int, growthRate: Double, years: Int): Int {
/**
 * Calculate the population growth over a certain number of years.
 * @param initialPopulation The initial population size.
 * @param growthRate The annual growth rate as a decimal value.
 * @param years The number of years to calculate the population growth.
 * @return The final population size after the specified number of years.
 */
fun calculatePopulationGrowth(initialPopulation: Int, growthRate: Double, years: Int): Int {

    var currentPopulation = initialPopulation
    var remainingYears = years

    while (remainingYears > 0) {
        currentPopulation += (currentPopulation * growthRate).toInt()
        remainingYears--
    }

    return currentPopulation
}