/**
 * This function applies a discount to the sale amount based on the customer's account balance.
 * If the customer has a negative balance, the discount is 10%.
 * Otherwise, no discount is applied.
 * Returns the discounted sale amount.
 */
fun applyDiscount(saleAmount: Double, customerBalance: Double): Double {

    val discountedAmount: Double = if (customerBalance < 0) {
        saleAmount * 0.9
    } else {
        saleAmount
    }
    return discountedAmount
}
/**
 * This function applies a discount to the sale amount based on the customer's account balance.
 * If the customer has a negative balance, the discount is 10%.
 * Otherwise, no discount is applied.
 * Returns the discounted sale amount.
 */
fun applyDiscount(saleAmount: Double, customerBalance: Double): Double {
/**
 * This function applies a discount to the sale amount based on the customer's account balance.
 * If the customer has a negative balance, the discount is 10%.
 * Otherwise, no discount is applied.
 * Returns the discounted sale amount.
 */
fun applyDiscount(saleAmount: Double, customerBalance: Double): Double {

    val discountedAmount: Double = if (customerBalance < 0) {
        saleAmount * 0.9
    } else {
        saleAmount
    }
    return discountedAmount
}