/**
 * This exercise includes nested if statements and branching statements to determine eligibility for social welfare benefits based on age, income, and job status.
 *
 * Your task is to complete the code by adding appropriate conditions and statements to assess the eligibility of an individual for social welfare benefits.
 *
 * @param age The age of the individual.
 * @param income The annual income of the individual.
 * @param job The job status of the individual ('employed', 'unemployed', or 'self-employed').
 * @return A message indicating whether the individual is eligible for social welfare benefits or not.
 */
fun checkAge(age: Int, income: Float, job: String): String {

    // Check if the age is less than or equal to 18
    if (age <= 18) {
        return "Not eligible for social welfare benefits."
    }
    
    // Check if the age is between 18 and 60 (inclusive)
    else if (age in 18..60) {
        if (job.isEmpty()) {
            return "Not eligible for social welfare benefits."
        } else if (job == "employed") {
            // Check if the income is less than 20000
            if (income < 20000) {
                return "Eligible"
            }
        }
    }
    
    return "Not eligible for social welfare benefits."
}
/**
 * This exercise includes nested if statements and branching statements to determine eligibility for social welfare benefits based on age, income, and job status.
 *
 * Your task is to complete the code by adding appropriate conditions and statements to assess the eligibility of an individual for social welfare benefits.
 *
 * @param age The age of the individual.
 * @param income The annual income of the individual.
 * @param job The job status of the individual ('employed', 'unemployed', or 'self-employed').
 * @return A message indicating whether the individual is eligible for social welfare benefits or not.
 */
fun checkAge(age: Int, income: Float, job: String): String {
/**
 * This exercise includes nested if statements and branching statements to determine eligibility for social welfare benefits based on age, income, and job status.
 *
 * Your task is to complete the code by adding appropriate conditions and statements to assess the eligibility of an individual for social welfare benefits.
 *
 * @param age The age of the individual.
 * @param income The annual income of the individual.
 * @param job The job status of the individual ('employed', 'unemployed', or 'self-employed').
 * @return A message indicating whether the individual is eligible for social welfare benefits or not.
 */
fun checkAge(age: Int, income: Float, job: String): String {

    // Check if the age is less than or equal to 18
    if (age <= 18) {
        return "Not eligible for social welfare benefits."
    }
    
    // Check if the age is between 18 and 60 (inclusive)
    else if (age in 18..60) {
        if (job.isEmpty()) {
            return "Not eligible for social welfare benefits."
        } else if (job == "employed") {
            // Check if the income is less than 20000
            if (income < 20000) {
                return "Eligible"
            }
        }
    }
    
    return "Not eligible for social welfare benefits."
}