/**
 * A farmer wants to calculate the total harvest based on the bushels per plant and the number of plants in the field.
 * Complete the code to calculate the harvest using a while loop.
 *
 * @param bushelsPerPlant The average number of bushels produced by each plant.
 * @param numPlants The total number of plants in the field.
 * @return The total harvest in bushels.
 */
fun calculateHarvest(bushelsPerPlant: Double, numPlants: Int): Double {

    var i = 0  // counter
    var totalHarvest = 0.0

    // Calculate the total harvest using a while loop
    while (i < numPlants) {
        totalHarvest += bushelsPerPlant
        i++
    }

    return totalHarvest
}
/**
 * A farmer wants to calculate the total harvest based on the bushels per plant and the number of plants in the field.
 * Complete the code to calculate the harvest using a while loop.
 *
 * @param bushelsPerPlant The average number of bushels produced by each plant.
 * @param numPlants The total number of plants in the field.
 * @return The total harvest in bushels.
 */
fun calculateHarvest(bushelsPerPlant: Double, numPlants: Int): Double {
/**
 * A farmer wants to calculate the total harvest based on the bushels per plant and the number of plants in the field.
 * Complete the code to calculate the harvest using a while loop.
 *
 * @param bushelsPerPlant The average number of bushels produced by each plant.
 * @param numPlants The total number of plants in the field.
 * @return The total harvest in bushels.
 */
fun calculateHarvest(bushelsPerPlant: Double, numPlants: Int): Double {

    var i = 0  // counter
    var totalHarvest = 0.0

    // Calculate the total harvest using a while loop
    while (i < numPlants) {
        totalHarvest += bushelsPerPlant
        i++
    }

    return totalHarvest
}