/**
 * This function calculates the average inflation rate between two given years.
 *
 * @param startValue The starting value (year 1).
 * @param endValue The ending value (year 2).
 * @return The average inflation rate between the two years.
 */
fun calculateInflation(startValue: Double, endValue: Double): Double {

    // Calculate the percentage change between the two values
    val percentageChange = ((endValue - startValue) / startValue) * 100

    // If the inflation rate is greater than or equal to 5%, print a warning message
    if (percentageChange >= 5) {
        println("Warning: The inflation rate is quite high!")
    } else {
        // If the inflation rate is less than 5%, print a success message
        println("The inflation rate is within acceptable limits.")
    }

    return percentageChange
}
/**
 * This function calculates the average inflation rate between two given years.
 *
 * @param startValue The starting value (year 1).
 * @param endValue The ending value (year 2).
 * @return The average inflation rate between the two years.
 */
fun calculateInflation(startValue: Double, endValue: Double): Double {
/**
 * This function calculates the average inflation rate between two given years.
 *
 * @param startValue The starting value (year 1).
 * @param endValue The ending value (year 2).
 * @return The average inflation rate between the two years.
 */
fun calculateInflation(startValue: Double, endValue: Double): Double {

    // Calculate the percentage change between the two values
    val percentageChange = ((endValue - startValue) / startValue) * 100

    // If the inflation rate is greater than or equal to 5%, print a warning message
    if (percentageChange >= 5) {
        println("Warning: The inflation rate is quite high!")
    } else {
        // If the inflation rate is less than 5%, print a success message
        println("The inflation rate is within acceptable limits.")
    }

    return percentageChange
}