/**
 * Calculate the monthly salary of an anthropologist based on the number of hours worked and the hourly rate.
 *
 * @param hoursWorked The number of hours worked.
 * @param hourlyRate The hourly rate.
 * @return The calculated monthly salary.
 */
fun anthropologistSalary(hoursWorked: Int, hourlyRate: Double): Double {

    // Calculate the total salary earned in a month
    var salary = hoursWorked * hourlyRate

    // Calculate the bonus based on performance
    val bonus: Double = when {
        salary > 10000 -> 0.2 * salary
        salary > 5000 -> 0.1 * salary
        else -> 0.0
    }
    salary += bonus

    // Calculate the monthly tax deduction
    val tax: Double = when {
        salary > 20000 -> 0.3 * salary
        salary > 10000 -> 0.2 * salary
        salary > 5000 -> 0.1 * salary
        else -> 0.0
    }

    val finalSalary = salary - tax

    // Return the final calculated salary
    return finalSalary
}
/**
 * Calculate the monthly salary of an anthropologist based on the number of hours worked and the hourly rate.
 *
 * @param hoursWorked The number of hours worked.
 * @param hourlyRate The hourly rate.
 * @return The calculated monthly salary.
 */
fun anthropologistSalary(hoursWorked: Int, hourlyRate: Double): Double {
/**
 * Calculate the monthly salary of an anthropologist based on the number of hours worked and the hourly rate.
 *
 * @param hoursWorked The number of hours worked.
 * @param hourlyRate The hourly rate.
 * @return The calculated monthly salary.
 */
fun anthropologistSalary(hoursWorked: Int, hourlyRate: Double): Double {

    // Calculate the total salary earned in a month
    var salary = hoursWorked * hourlyRate

    // Calculate the bonus based on performance
    val bonus: Double = when {
        salary > 10000 -> 0.2 * salary
        salary > 5000 -> 0.1 * salary
        else -> 0.0
    }
    salary += bonus

    // Calculate the monthly tax deduction
    val tax: Double = when {
        salary > 20000 -> 0.3 * salary
        salary > 10000 -> 0.2 * salary
        salary > 5000 -> 0.1 * salary
        else -> 0.0
    }

    val finalSalary = salary - tax

    // Return the final calculated salary
    return finalSalary
}