/**
 * Firefighters save money from their salary every month to achieve their goal savings.
 * The function 'determineSmallestNumber' takes the current salary and goal savings as input,
 * and returns the smallest integer value of number of months they need to achieve the goal savings
 * without raising their salary.
 *
 * The firefighter's monthly savings is fixed (25% of salary) and their salary does not change over time.
 *
 * @param salary The firefighter's current salary.
 * @param goalSavings The firefighter's goal savings.
 * @return The smallest number of months required to achieve the goal savings without raising the salary.
 *
 * Example:
 * determineSmallestNumber(1200.0, 5000.0)
 * Expected output: 17
 *
 * determineSmallestNumber(500.0, 10000.0)
 * Expected output: 80
 */
fun determineSmallestNumber(salary: Double, goalSavings: Double): Int {

    var currentSavings = 0.0
    var monthsNeeded = 0

    while (currentSavings < goalSavings) {
        currentSavings += salary * 0.25
        monthsNeeded++
    }

    return monthsNeeded
}
/**
 * Firefighters save money from their salary every month to achieve their goal savings.
 * The function 'determineSmallestNumber' takes the current salary and goal savings as input,
 * and returns the smallest integer value of number of months they need to achieve the goal savings
 * without raising their salary.
 *
 * The firefighter's monthly savings is fixed (25% of salary) and their salary does not change over time.
 *
 * @param salary The firefighter's current salary.
 * @param goalSavings The firefighter's goal savings.
 * @return The smallest number of months required to achieve the goal savings without raising the salary.
 *
 * Example:
 * determineSmallestNumber(1200.0, 5000.0)
 * Expected output: 17
 *
 * determineSmallestNumber(500.0, 10000.0)
 * Expected output: 80
 */
fun determineSmallestNumber(salary: Double, goalSavings: Double): Int {
/**
 * Firefighters save money from their salary every month to achieve their goal savings.
 * The function 'determineSmallestNumber' takes the current salary and goal savings as input,
 * and returns the smallest integer value of number of months they need to achieve the goal savings
 * without raising their salary.
 *
 * The firefighter's monthly savings is fixed (25% of salary) and their salary does not change over time.
 *
 * @param salary The firefighter's current salary.
 * @param goalSavings The firefighter's goal savings.
 * @return The smallest number of months required to achieve the goal savings without raising the salary.
 *
 * Example:
 * determineSmallestNumber(1200.0, 5000.0)
 * Expected output: 17
 *
 * determineSmallestNumber(500.0, 10000.0)
 * Expected output: 80
 */
fun determineSmallestNumber(salary: Double, goalSavings: Double): Int {

    var currentSavings = 0.0
    var monthsNeeded = 0

    while (currentSavings < goalSavings) {
        currentSavings += salary * 0.25
        monthsNeeded++
    }

    return monthsNeeded
}