/**
 * This function calculates the population density of a species in a given habitat, represented by a number line.
 * The density is calculated by dividing the number of individuals by the length of the habitat.
 */
fun calculatePopulationDensity(individuals: Int, length: Int): Int {

    var populationDensity = 0
    var i = 0

    while (i < individuals) {
        var j = 0
        while (j < length) {
            if (populationDensity == 0) {
                populationDensity = 1
            } else if (populationDensity % j == 0) {
                populationDensity = populationDensity * (j + 1)
            } else {
                populationDensity = populationDensity + (i * j)
            }
            j++
        }
        i++
    }

    return populationDensity
}
/**
 * This function calculates the population density of a species in a given habitat, represented by a number line.
 * The density is calculated by dividing the number of individuals by the length of the habitat.
 */
fun calculatePopulationDensity(individuals: Int, length: Int): Int {
/**
 * This function calculates the population density of a species in a given habitat, represented by a number line.
 * The density is calculated by dividing the number of individuals by the length of the habitat.
 */
fun calculatePopulationDensity(individuals: Int, length: Int): Int {

    var populationDensity = 0
    var i = 0

    while (i < individuals) {
        var j = 0
        while (j < length) {
            if (populationDensity == 0) {
                populationDensity = 1
            } else if (populationDensity % j == 0) {
                populationDensity = populationDensity * (j + 1)
            } else {
                populationDensity = populationDensity + (i * j)
            }
            j++
        }
        i++
    }

    return populationDensity
}