/**
 * This exercise requires calculating the interest rate based on the principal amount and rate.
 * However, you need to ensure that floating-point arithmetic operations are used correctly
 * and that the code implements short-circuiting to save unnecessary calculations and improve performance.
 * Good luck!
 */
fun calculateInterest(principal: Double, rate: Double): Double? {

    var interest: Double? = null

    if (principal > 0 && rate != 0.0) {
        interest = (principal * rate) / 100
    }

    return interest
}
/**
 * This exercise requires calculating the interest rate based on the principal amount and rate.
 * However, you need to ensure that floating-point arithmetic operations are used correctly
 * and that the code implements short-circuiting to save unnecessary calculations and improve performance.
 * Good luck!
 */
fun calculateInterest(principal: Double, rate: Double): Double? {
/**
 * This exercise requires calculating the interest rate based on the principal amount and rate.
 * However, you need to ensure that floating-point arithmetic operations are used correctly
 * and that the code implements short-circuiting to save unnecessary calculations and improve performance.
 * Good luck!
 */
fun calculateInterest(principal: Double, rate: Double): Double? {

    var interest: Double? = null

    if (principal > 0 && rate != 0.0) {
        interest = (principal * rate) / 100
    }

    return interest
}