/**
 * This function takes the original price and the discount percentage and returns the final discounted price,
 * considering short-circuiting with if-else and sequential statements.
 */
fun calculateTotalPrice(price: Double, discount: Double): Double {

    var discountPrice = price - (price * discount / 100)

    if (price < 50) {
        discountPrice -= discountPrice * 10 / 100
    } else if (price in 100.0..200.0) {
        discountPrice -= discountPrice * 15 / 100
    } else if (price > 200) {
        discountPrice -= discountPrice * 20 / 100
    }

    return discountPrice
}
/**
 * This function takes the original price and the discount percentage and returns the final discounted price,
 * considering short-circuiting with if-else and sequential statements.
 */
fun calculateTotalPrice(price: Double, discount: Double): Double {
/**
 * This function takes the original price and the discount percentage and returns the final discounted price,
 * considering short-circuiting with if-else and sequential statements.
 */
fun calculateTotalPrice(price: Double, discount: Double): Double {

    var discountPrice = price - (price * discount / 100)

    if (price < 50) {
        discountPrice -= discountPrice * 10 / 100
    } else if (price in 100.0..200.0) {
        discountPrice -= discountPrice * 15 / 100
    } else if (price > 200) {
        discountPrice -= discountPrice * 20 / 100
    }

    return discountPrice
}