/**
 * Calculate the salary of an accountant based on the number of hours worked, hourly rate, 
 * and total expenses incurred for the month.
 *
 * @param hoursWorked Total number of hours worked by the accountant.
 * @param hourlyRate Hourly rate of the accountant.
 * @param totalExpenses Total expenses incurred by the accountant for the month.
 * @return The calculated salary after deducting the expenses.
 */
fun calculateSalary(hoursWorked: Int, hourlyRate: Int, totalExpenses: Int): Int {

    val salary: Int
    when {
        hoursWorked >= 160 && totalExpenses <= 1000 -> salary = hoursWorked * hourlyRate - totalExpenses
        hoursWorked >= 160 && totalExpenses > 1000 -> salary = hoursWorked * 10
        hoursWorked < 160 && totalExpenses <= 1000 -> salary = hoursWorked * 8
        else -> salary = 0
    }
    return salary
}
/**
 * Calculate the salary of an accountant based on the number of hours worked, hourly rate, 
 * and total expenses incurred for the month.
 *
 * @param hoursWorked Total number of hours worked by the accountant.
 * @param hourlyRate Hourly rate of the accountant.
 * @param totalExpenses Total expenses incurred by the accountant for the month.
 * @return The calculated salary after deducting the expenses.
 */
fun calculateSalary(hoursWorked: Int, hourlyRate: Int, totalExpenses: Int): Int {
/**
 * Calculate the salary of an accountant based on the number of hours worked, hourly rate, 
 * and total expenses incurred for the month.
 *
 * @param hoursWorked Total number of hours worked by the accountant.
 * @param hourlyRate Hourly rate of the accountant.
 * @param totalExpenses Total expenses incurred by the accountant for the month.
 * @return The calculated salary after deducting the expenses.
 */
fun calculateSalary(hoursWorked: Int, hourlyRate: Int, totalExpenses: Int): Int {

    val salary: Int
    when {
        hoursWorked >= 160 && totalExpenses <= 1000 -> salary = hoursWorked * hourlyRate - totalExpenses
        hoursWorked >= 160 && totalExpenses > 1000 -> salary = hoursWorked * 10
        hoursWorked < 160 && totalExpenses <= 1000 -> salary = hoursWorked * 8
        else -> salary = 0
    }
    return salary
}