/**
 * A farmer wants to calculate his profit, which is the difference between his sales and expenses.
 * However, he wants to format the profit with a dollar sign, commas for thousands, and two decimal places.
 * Complete the 'formatProfit' function which takes in the 'sales' and 'expenses' as parameters and returns the formatted profit.
 *
 * @param sales The farmer's total sales.
 * @param expenses The farmer's total expenses.
 * @return The formatted profit with a dollar sign, commas for thousands, and two decimal places.
 */
fun formatProfit(sales: Double, expenses: Double): String {

    val profit = sales - expenses
    val formattedProfit = "$%.2f".format(profit)
    return formattedProfit
}
/**
 * A farmer wants to calculate his profit, which is the difference between his sales and expenses.
 * However, he wants to format the profit with a dollar sign, commas for thousands, and two decimal places.
 * Complete the 'formatProfit' function which takes in the 'sales' and 'expenses' as parameters and returns the formatted profit.
 *
 * @param sales The farmer's total sales.
 * @param expenses The farmer's total expenses.
 * @return The formatted profit with a dollar sign, commas for thousands, and two decimal places.
 */
fun formatProfit(sales: Double, expenses: Double): String {
/**
 * A farmer wants to calculate his profit, which is the difference between his sales and expenses.
 * However, he wants to format the profit with a dollar sign, commas for thousands, and two decimal places.
 * Complete the 'formatProfit' function which takes in the 'sales' and 'expenses' as parameters and returns the formatted profit.
 *
 * @param sales The farmer's total sales.
 * @param expenses The farmer's total expenses.
 * @return The formatted profit with a dollar sign, commas for thousands, and two decimal places.
 */
fun formatProfit(sales: Double, expenses: Double): String {

    val profit = sales - expenses
    val formattedProfit = "$%.2f".format(profit)
    return formattedProfit
}