/**
 * This function calculates the inflation rate between two prices.
 *
 * @param priceOld the old price value
 * @param priceNew the new price value
 * @return The inflation rate as a floating-point number rounded to two decimal places
 */
fun calculateInflationRate(priceOld: Double, priceNew: Double): Double? {

    if (priceOld > 0 && priceNew > 0) {
        val inflationRate = ((priceNew - priceOld) / priceOld) * 100
        return "%.2f".format(inflationRate).toDouble()
    }
    return null
}
/**
 * This function calculates the inflation rate between two prices.
 *
 * @param priceOld the old price value
 * @param priceNew the new price value
 * @return The inflation rate as a floating-point number rounded to two decimal places
 */
fun calculateInflationRate(priceOld: Double, priceNew: Double): Double? {
/**
 * This function calculates the inflation rate between two prices.
 *
 * @param priceOld the old price value
 * @param priceNew the new price value
 * @return The inflation rate as a floating-point number rounded to two decimal places
 */
fun calculateInflationRate(priceOld: Double, priceNew: Double): Double? {

    if (priceOld > 0 && priceNew > 0) {
        val inflationRate = ((priceNew - priceOld) / priceOld) * 100
        return "%.2f".format(inflationRate).toDouble()
    }
    return null
}