/**
 * A fashion designer wants to calculate the total cost of an order.
 * The total cost is based on the quantity of items and the price per item.
 * If the quantity is greater than or equal to 100 and the price per item is greater than $50,
 * a discount of 20% is applied.
 * If the quantity is greater than or equal to 50 and the price per item is greater than $30,
 * a discount of 15% is applied.
 * If the quantity is greater than or equal to 20 and the price per item is greater than $20,
 * a discount of 10% is applied.
 * If none of the conditions are met, no discount is applied.
 * The function should return the total cost after applying the discount if applicable.
 */
fun calculateTotalCost(quantity: Int, pricePerItem: Double): Double {

    var totalCost = quantity * pricePerItem

    if (quantity >= 100 && pricePerItem > 50) {
        totalCost -= totalCost * 0.20
    } else if (quantity >= 50 && pricePerItem > 30) {
        totalCost -= totalCost * 0.15
    } else if (quantity >= 20 && pricePerItem > 20) {
        totalCost -= totalCost * 0.10
    }

    return totalCost
}
/**
 * A fashion designer wants to calculate the total cost of an order.
 * The total cost is based on the quantity of items and the price per item.
 * If the quantity is greater than or equal to 100 and the price per item is greater than $50,
 * a discount of 20% is applied.
 * If the quantity is greater than or equal to 50 and the price per item is greater than $30,
 * a discount of 15% is applied.
 * If the quantity is greater than or equal to 20 and the price per item is greater than $20,
 * a discount of 10% is applied.
 * If none of the conditions are met, no discount is applied.
 * The function should return the total cost after applying the discount if applicable.
 */
fun calculateTotalCost(quantity: Int, pricePerItem: Double): Double {
/**
 * A fashion designer wants to calculate the total cost of an order.
 * The total cost is based on the quantity of items and the price per item.
 * If the quantity is greater than or equal to 100 and the price per item is greater than $50,
 * a discount of 20% is applied.
 * If the quantity is greater than or equal to 50 and the price per item is greater than $30,
 * a discount of 15% is applied.
 * If the quantity is greater than or equal to 20 and the price per item is greater than $20,
 * a discount of 10% is applied.
 * If none of the conditions are met, no discount is applied.
 * The function should return the total cost after applying the discount if applicable.
 */
fun calculateTotalCost(quantity: Int, pricePerItem: Double): Double {

    var totalCost = quantity * pricePerItem

    if (quantity >= 100 && pricePerItem > 50) {
        totalCost -= totalCost * 0.20
    } else if (quantity >= 50 && pricePerItem > 30) {
        totalCost -= totalCost * 0.15
    } else if (quantity >= 20 && pricePerItem > 20) {
        totalCost -= totalCost * 0.10
    }

    return totalCost
}