/**
 * Given two lists of heights (in cm) and weights (in kg) of individuals, this function calculates and prints the BMI
 * (Body Mass Index) for each individual.
 *
 * @param heights A list of heights (in cm) of individuals.
 * @param weights A list of weights (in kg) of individuals.
 */
fun printBmiTable(heights: List<Double>, weights: List<Double>) {

    var index = 0
    while (index < heights.size) {
        val height = heights[index]
        val weight = weights[index]

        // Calculate the BMI
        val bmi = weight / ((height / 100) * (height / 100))

        // Print the BMI
        println("The BMI for person ${index + 1} is: ${"%.2f".format(bmi)}")

        index++
    }
}
/**
 * Given two lists of heights (in cm) and weights (in kg) of individuals, this function calculates and prints the BMI
 * (Body Mass Index) for each individual.
 *
 * @param heights A list of heights (in cm) of individuals.
 * @param weights A list of weights (in kg) of individuals.
 */
fun printBmiTable(heights: List<Double>, weights: List<Double>) {
/**
 * Given two lists of heights (in cm) and weights (in kg) of individuals, this function calculates and prints the BMI
 * (Body Mass Index) for each individual.
 *
 * @param heights A list of heights (in cm) of individuals.
 * @param weights A list of weights (in kg) of individuals.
 */
fun printBmiTable(heights: List<Double>, weights: List<Double>) {

    var index = 0
    while (index < heights.size) {
        val height = heights[index]
        val weight = weights[index]

        // Calculate the BMI
        val bmi = weight / ((height / 100) * (height / 100))

        // Print the BMI
        println("The BMI for person ${index + 1} is: ${"%.2f".format(bmi)}")

        index++
    }
}