/**
 * A veterinarian wants to calculate the total cost of medication for each animal in their clinic. The map
 * 'medications' contains the medication name as the key and its unit price as the value (in dollars).
 *
 * Your task is to loop through the 'medications' map and calculate the total medication cost for each animal.
 * Finally, return the total medication cost for all animals combined.
 *
 * Example:
 * If medications = mapOf("Heartgard" to 25.99, "Rimadyl" to 37.50, "ProHeart" to 45.99), then the total cost of medication for
 * each animal would be: 109.48
 */
fun calculateMedicationCost(medications: Map<String, Double>): Double {

    var totalCost = 0.0
    
    // Loop through the map to calculate the total medication cost
    for ((_, unitPrice) in medications) {
        totalCost += unitPrice
    }
    
    return totalCost
}
/**
 * A veterinarian wants to calculate the total cost of medication for each animal in their clinic. The map
 * 'medications' contains the medication name as the key and its unit price as the value (in dollars).
 *
 * Your task is to loop through the 'medications' map and calculate the total medication cost for each animal.
 * Finally, return the total medication cost for all animals combined.
 *
 * Example:
 * If medications = mapOf("Heartgard" to 25.99, "Rimadyl" to 37.50, "ProHeart" to 45.99), then the total cost of medication for
 * each animal would be: 109.48
 */
fun calculateMedicationCost(medications: Map<String, Double>): Double {
/**
 * A veterinarian wants to calculate the total cost of medication for each animal in their clinic. The map
 * 'medications' contains the medication name as the key and its unit price as the value (in dollars).
 *
 * Your task is to loop through the 'medications' map and calculate the total medication cost for each animal.
 * Finally, return the total medication cost for all animals combined.
 *
 * Example:
 * If medications = mapOf("Heartgard" to 25.99, "Rimadyl" to 37.50, "ProHeart" to 45.99), then the total cost of medication for
 * each animal would be: 109.48
 */
fun calculateMedicationCost(medications: Map<String, Double>): Double {

    var totalCost = 0.0
    
    // Loop through the map to calculate the total medication cost
    for ((_, unitPrice) in medications) {
        totalCost += unitPrice
    }
    
    return totalCost
}