/**
 * This function multiplies each ingredient in the list by the given amount and assigns the result back to the ingredient.
 * @param ingredients a list of ingredients
 * @param amount the value to multiply each ingredient with
 */
fun multiplyAndAssignIngredients(ingredients: MutableList<String>, amount: Int) {

    val chef = "Gordon Ramsay"

    // Iterate over each ingredient using a for loop
    for (index in ingredients.indices) {
        // Multiply the ingredient by the given amount using the multiplication assignment operator
        ingredients[index] = (ingredients[index].toInt() * amount).toString()

        // Print the updated ingredient
        println("$chef multiplied $amount and assigned the result to ${ingredients[index]}.")
    }
}
/**
 * This function multiplies each ingredient in the list by the given amount and assigns the result back to the ingredient.
 * @param ingredients a list of ingredients
 * @param amount the value to multiply each ingredient with
 */
fun multiplyAndAssignIngredients(ingredients: MutableList<String>, amount: Int) {
/**
 * This function multiplies each ingredient in the list by the given amount and assigns the result back to the ingredient.
 * @param ingredients a list of ingredients
 * @param amount the value to multiply each ingredient with
 */
fun multiplyAndAssignIngredients(ingredients: MutableList<String>, amount: Int) {

    val chef = "Gordon Ramsay"

    // Iterate over each ingredient using a for loop
    for (index in ingredients.indices) {
        // Multiply the ingredient by the given amount using the multiplication assignment operator
        ingredients[index] = (ingredients[index].toInt() * amount).toString()

        // Print the updated ingredient
        println("$chef multiplied $amount and assigned the result to ${ingredients[index]}.")
    }
}