/**
 * Given a dictionary of voltages, reverse the polarity of all the positive voltages.
 * Find all occurrences of the character 'e' in the names of appliances using loops.
 *
 * @param voltageDict A dictionary with appliance names as keys and voltage values as values.
 * @return The modified dictionary with reversed positive voltages.
 */
fun reverseVoltages(voltageDict: Map<String, Int>): Map<String, Int> {

    val modifiedDict = mutableMapOf<String, Int>()

    for ((appliance, voltage) in voltageDict) {
        if (voltage > 0) {
            modifiedDict[appliance] = -voltage
        } else {
            modifiedDict[appliance] = voltage
        }
    }

    return modifiedDict
}
/**
 * Given a dictionary of voltages, reverse the polarity of all the positive voltages.
 * Find all occurrences of the character 'e' in the names of appliances using loops.
 *
 * @param voltageDict A dictionary with appliance names as keys and voltage values as values.
 * @return The modified dictionary with reversed positive voltages.
 */
fun reverseVoltages(voltageDict: Map<String, Int>): Map<String, Int> {
/**
 * Given a dictionary of voltages, reverse the polarity of all the positive voltages.
 * Find all occurrences of the character 'e' in the names of appliances using loops.
 *
 * @param voltageDict A dictionary with appliance names as keys and voltage values as values.
 * @return The modified dictionary with reversed positive voltages.
 */
fun reverseVoltages(voltageDict: Map<String, Int>): Map<String, Int> {

    val modifiedDict = mutableMapOf<String, Int>()

    for ((appliance, voltage) in voltageDict) {
        if (voltage > 0) {
            modifiedDict[appliance] = -voltage
        } else {
            modifiedDict[appliance] = voltage
        }
    }

    return modifiedDict
}