/**
 * Calculate the total amount of savings based on the given budget, expenses, and savings rate.
 *
 * @param budget The initial amount of money you have.
 * @param expenses The total amount of money spent.
 * @param savingsRate The percentage of the remaining budget you want to save.
 * @return The final amount of savings.
 */
fun calculateSavings(budget: Float, expenses: Float, savingsRate: Float): Float {

    var savings = budget * expenses / 1.0f
    
    var remainingBudget = budget
    while (remainingBudget > 0) {
        remainingBudget /= savingsRate
    }
    
    return remainingBudget
}
/**
 * Calculate the total amount of savings based on the given budget, expenses, and savings rate.
 *
 * @param budget The initial amount of money you have.
 * @param expenses The total amount of money spent.
 * @param savingsRate The percentage of the remaining budget you want to save.
 * @return The final amount of savings.
 */
fun calculateSavings(budget: Float, expenses: Float, savingsRate: Float): Float {
/**
 * Calculate the total amount of savings based on the given budget, expenses, and savings rate.
 *
 * @param budget The initial amount of money you have.
 * @param expenses The total amount of money spent.
 * @param savingsRate The percentage of the remaining budget you want to save.
 * @return The final amount of savings.
 */
fun calculateSavings(budget: Float, expenses: Float, savingsRate: Float): Float {

    var savings = budget * expenses / 1.0f
    
    var remainingBudget = budget
    while (remainingBudget > 0) {
        remainingBudget /= savingsRate
    }
    
    return remainingBudget
}