/**
 * This function calculates the salary of a nurse based on their grade and years of experience.
 * The nurse's grade ranges from 1 to 5, and their years of experience ranges from 0 to 10.
 *
 * The salary calculation is as follows:
 * - Grade 1: $20,000
 * - Grade 2: $25,000
 * - Grade 3: $30,000
 * - Grade 4: $35,000
 * - Grade 5: $40,000
 *
 * Additionally, if the nurse has more than 5 years of experience, they receive a bonus of $5,000.
 *
 * @param grade The grade of the nurse (1 to 5).
 * @param experience The years of experience of the nurse (0 to 10).
 * @return The calculated salary of the nurse.
 */
fun calculateNurseSalary(grade: Int, experience: Int): Int {

    var salary = 0

    if (grade < 1 || grade > 5) {
        return 0 // Or throw an exception for invalid grade
    }

    salary = when (grade) {
        1 -> 20000
        2 -> 25000
        3 -> 30000
        4 -> 35000
        5 -> 40000
        else -> 0
    }

    if (experience > 5) {
        salary += 5000
    }

    return salary
}
/**
 * This function calculates the salary of a nurse based on their grade and years of experience.
 * The nurse's grade ranges from 1 to 5, and their years of experience ranges from 0 to 10.
 *
 * The salary calculation is as follows:
 * - Grade 1: $20,000
 * - Grade 2: $25,000
 * - Grade 3: $30,000
 * - Grade 4: $35,000
 * - Grade 5: $40,000
 *
 * Additionally, if the nurse has more than 5 years of experience, they receive a bonus of $5,000.
 *
 * @param grade The grade of the nurse (1 to 5).
 * @param experience The years of experience of the nurse (0 to 10).
 * @return The calculated salary of the nurse.
 */
fun calculateNurseSalary(grade: Int, experience: Int): Int {
/**
 * This function calculates the salary of a nurse based on their grade and years of experience.
 * The nurse's grade ranges from 1 to 5, and their years of experience ranges from 0 to 10.
 *
 * The salary calculation is as follows:
 * - Grade 1: $20,000
 * - Grade 2: $25,000
 * - Grade 3: $30,000
 * - Grade 4: $35,000
 * - Grade 5: $40,000
 *
 * Additionally, if the nurse has more than 5 years of experience, they receive a bonus of $5,000.
 *
 * @param grade The grade of the nurse (1 to 5).
 * @param experience The years of experience of the nurse (0 to 10).
 * @return The calculated salary of the nurse.
 */
fun calculateNurseSalary(grade: Int, experience: Int): Int {

    var salary = 0

    if (grade < 1 || grade > 5) {
        return 0 // Or throw an exception for invalid grade
    }

    salary = when (grade) {
        1 -> 20000
        2 -> 25000
        3 -> 30000
        4 -> 35000
        5 -> 40000
        else -> 0
    }

    if (experience > 5) {
        salary += 5000
    }

    return salary
}