/**
 * You are a fashion designer and you have a map representing the stock of your clothing items.
 * Each key represents an item name (string) and its corresponding value represents the quantity in stock (integer).
 *
 * Your task is to count the total number of items in stock.
 *
 * Write a function that takes a map 'stock' as a parameter and returns the total number of items in stock.
 *
 * Example:
 * countItemsInStock(mapOf("shirt" to 20, "pants" to 15, "dress" to 10))
 * Returns:
 * 45
 */
fun countItemsInStock(stock: Map<String, Int>): Int {

    var totalItems = 0
    
    for (itemQuantity in stock.values) {
        totalItems += itemQuantity
    }
    
    return totalItems
}
/**
 * You are a fashion designer and you have a map representing the stock of your clothing items.
 * Each key represents an item name (string) and its corresponding value represents the quantity in stock (integer).
 *
 * Your task is to count the total number of items in stock.
 *
 * Write a function that takes a map 'stock' as a parameter and returns the total number of items in stock.
 *
 * Example:
 * countItemsInStock(mapOf("shirt" to 20, "pants" to 15, "dress" to 10))
 * Returns:
 * 45
 */
fun countItemsInStock(stock: Map<String, Int>): Int {
/**
 * You are a fashion designer and you have a map representing the stock of your clothing items.
 * Each key represents an item name (string) and its corresponding value represents the quantity in stock (integer).
 *
 * Your task is to count the total number of items in stock.
 *
 * Write a function that takes a map 'stock' as a parameter and returns the total number of items in stock.
 *
 * Example:
 * countItemsInStock(mapOf("shirt" to 20, "pants" to 15, "dress" to 10))
 * Returns:
 * 45
 */
fun countItemsInStock(stock: Map<String, Int>): Int {

    var totalItems = 0
    
    for (itemQuantity in stock.values) {
        totalItems += itemQuantity
    }
    
    return totalItems
}