/**
 * This function calculates the profit of a product based on its price, quantity, fixed costs, and variable costs.
 *
 * @param price The price at which the product is sold.
 * @param quantity The quantity of the product sold.
 * @param fixedCosts The fixed costs associated with producing the product.
 * @param variableCosts The variable costs associated with producing each unit of the product.
 * @return The profit obtained from selling the product.
 */
fun calculateProfit(price: Double, quantity: Int, fixedCosts: Double, variableCosts: Double): Double {

    val revenue = price * quantity
    val totalCosts = fixedCosts + variableCosts * quantity
    val profit = revenue - totalCosts
    return profit
}
/**
 * This function calculates the profit of a product based on its price, quantity, fixed costs, and variable costs.
 *
 * @param price The price at which the product is sold.
 * @param quantity The quantity of the product sold.
 * @param fixedCosts The fixed costs associated with producing the product.
 * @param variableCosts The variable costs associated with producing each unit of the product.
 * @return The profit obtained from selling the product.
 */
fun calculateProfit(price: Double, quantity: Int, fixedCosts: Double, variableCosts: Double): Double {
/**
 * This function calculates the profit of a product based on its price, quantity, fixed costs, and variable costs.
 *
 * @param price The price at which the product is sold.
 * @param quantity The quantity of the product sold.
 * @param fixedCosts The fixed costs associated with producing the product.
 * @param variableCosts The variable costs associated with producing each unit of the product.
 * @return The profit obtained from selling the product.
 */
fun calculateProfit(price: Double, quantity: Int, fixedCosts: Double, variableCosts: Double): Double {

    val revenue = price * quantity
    val totalCosts = fixedCosts + variableCosts * quantity
    val profit = revenue - totalCosts
    return profit
}