/**
 * Calculate the compound interest for a given principal amount, interest rate, and time period.
 *
 * @param principal The principal amount of money.
 * @param rate The annual interest rate as a decimal.
 * @param time The time period in years.
 * @return The total amount of money after interest is compounded.
 */
fun calculateInterest(principal: Double, rate: Double, time: Int): Double {

    // Calculate the compound interest
    val amount = principal * Math.pow(1 + rate, time.toDouble())
    return amount
}
/**
 * Calculate the compound interest for a given principal amount, interest rate, and time period.
 *
 * @param principal The principal amount of money.
 * @param rate The annual interest rate as a decimal.
 * @param time The time period in years.
 * @return The total amount of money after interest is compounded.
 */
fun calculateInterest(principal: Double, rate: Double, time: Int): Double {
/**
 * Calculate the compound interest for a given principal amount, interest rate, and time period.
 *
 * @param principal The principal amount of money.
 * @param rate The annual interest rate as a decimal.
 * @param time The time period in years.
 * @return The total amount of money after interest is compounded.
 */
fun calculateInterest(principal: Double, rate: Double, time: Int): Double {

    // Calculate the compound interest
    val amount = principal * Math.pow(1 + rate, time.toDouble())
    return amount
}