/**
 * The function checks if a promo code is valid and calculates the discount for a marketing manager.
 *
 * @param orderTotal The total amount of the order.
 * @param promoCode The promo code entered by the customer.
 * @return The discounted total amount after applying the promo code (if valid).
 */
fun promoDiscountCheck(orderTotal: Float, promoCode: String): Float {

    var discount = 0.0f

    if (promoCode == "SUMMER2021") {
        // Apply a fixed percentage discount for the summer promotion
        discount = orderTotal * 0.2f
    } else if (promoCode == "HOLIDAYS2021") {
        // Apply a fixed amount discount for the holidays promotion
        discount = 50.0f
    } else {
        // No valid promo code entered, no discount applied
        println("Invalid promo code. No discount applied.")
    }

    return orderTotal - discount
}
/**
 * The function checks if a promo code is valid and calculates the discount for a marketing manager.
 *
 * @param orderTotal The total amount of the order.
 * @param promoCode The promo code entered by the customer.
 * @return The discounted total amount after applying the promo code (if valid).
 */
fun promoDiscountCheck(orderTotal: Float, promoCode: String): Float {
/**
 * The function checks if a promo code is valid and calculates the discount for a marketing manager.
 *
 * @param orderTotal The total amount of the order.
 * @param promoCode The promo code entered by the customer.
 * @return The discounted total amount after applying the promo code (if valid).
 */
fun promoDiscountCheck(orderTotal: Float, promoCode: String): Float {

    var discount = 0.0f

    if (promoCode == "SUMMER2021") {
        // Apply a fixed percentage discount for the summer promotion
        discount = orderTotal * 0.2f
    } else if (promoCode == "HOLIDAYS2021") {
        // Apply a fixed amount discount for the holidays promotion
        discount = 50.0f
    } else {
        // No valid promo code entered, no discount applied
        println("Invalid promo code. No discount applied.")
    }

    return orderTotal - discount
}