/**
 * You are an accountant and you need to calculate the tax for an individual based on their income and deductions.
 * The tax is calculated using the following formula:
 *
 * tax = (income - deductions) * 0.15
 *
 * However, there are certain cases where special deductions are applicable. If the deductions are greater than the income,
 * then the tax will be 0. If the income is less than or equal to 0, then no tax should be paid. In all other cases, calculate
 * the tax using the formula mentioned above.
 *
 * Complete the function below to implement the tax calculation logic.
 */
fun calculateTax(income: Float, deductions: Float): Float {

    val tax: Float
    if (deductions > income) {
        tax = 0f
    } else if (income <= 0) {
        tax = 0f
    } else {
        tax = (income - deductions) * 0.15f
    }
    return tax
}
/**
 * You are an accountant and you need to calculate the tax for an individual based on their income and deductions.
 * The tax is calculated using the following formula:
 *
 * tax = (income - deductions) * 0.15
 *
 * However, there are certain cases where special deductions are applicable. If the deductions are greater than the income,
 * then the tax will be 0. If the income is less than or equal to 0, then no tax should be paid. In all other cases, calculate
 * the tax using the formula mentioned above.
 *
 * Complete the function below to implement the tax calculation logic.
 */
fun calculateTax(income: Float, deductions: Float): Float {
/**
 * You are an accountant and you need to calculate the tax for an individual based on their income and deductions.
 * The tax is calculated using the following formula:
 *
 * tax = (income - deductions) * 0.15
 *
 * However, there are certain cases where special deductions are applicable. If the deductions are greater than the income,
 * then the tax will be 0. If the income is less than or equal to 0, then no tax should be paid. In all other cases, calculate
 * the tax using the formula mentioned above.
 *
 * Complete the function below to implement the tax calculation logic.
 */
fun calculateTax(income: Float, deductions: Float): Float {

    val tax: Float
    if (deductions > income) {
        tax = 0f
    } else if (income <= 0) {
        tax = 0f
    } else {
        tax = (income - deductions) * 0.15f
    }
    return tax
}