/**
 * You are a Marketing Manager and need to apply a discount to a list of product prices.
 * Write a function that takes in two arguments: a list of prices and a discount percentage.
 * The function should modify the original list by applying the discount, and return the modified list.
 *
 * @param prices A list of prices
 * @param discount A float representing the discount percentage
 * @return The modified list of prices with the discount applied
 *
 * Example:
 * applyDiscount(listOf(100, 200, 300), 0.1)
 * Output: [90, 180, 270]
 */
fun applyDiscount(prices: MutableList<Double>, discount: Double): List<Double> {

    var i = 0
    while (i < prices.size) {
        prices[i] = prices[i] - (prices[i] * discount)
        i++
    }
    return prices
}
/**
 * You are a Marketing Manager and need to apply a discount to a list of product prices.
 * Write a function that takes in two arguments: a list of prices and a discount percentage.
 * The function should modify the original list by applying the discount, and return the modified list.
 *
 * @param prices A list of prices
 * @param discount A float representing the discount percentage
 * @return The modified list of prices with the discount applied
 *
 * Example:
 * applyDiscount(listOf(100, 200, 300), 0.1)
 * Output: [90, 180, 270]
 */
fun applyDiscount(prices: MutableList<Double>, discount: Double): List<Double> {
/**
 * You are a Marketing Manager and need to apply a discount to a list of product prices.
 * Write a function that takes in two arguments: a list of prices and a discount percentage.
 * The function should modify the original list by applying the discount, and return the modified list.
 *
 * @param prices A list of prices
 * @param discount A float representing the discount percentage
 * @return The modified list of prices with the discount applied
 *
 * Example:
 * applyDiscount(listOf(100, 200, 300), 0.1)
 * Output: [90, 180, 270]
 */
fun applyDiscount(prices: MutableList<Double>, discount: Double): List<Double> {

    var i = 0
    while (i < prices.size) {
        prices[i] = prices[i] - (prices[i] * discount)
        i++
    }
    return prices
}