/**
 * The calculateTotalCost function takes in two lists: items and prices.
 * It calculates the total cost of the items by multiplying the quantity of each item with its respective price.
 * The function returns the total cost.
 *
 * Example:
 * val items = listOf("chair", "table", "lamp")
 * val prices = listOf(50, 100, 30)
 * calculateTotalCost(items, prices) => 350
 */
fun calculateTotalCost(items: List<String>, prices: List<Int>): Int {

    var totalCost = 0

    for (i in items.indices) {
        val item = items[i]
        val price = prices[i]

        print("Enter the quantity of $item: ")
        val quantity = readLine()!!.toInt()

        val cost = quantity * price

        totalCost += cost
    }

    return totalCost
}
/**
 * The calculateTotalCost function takes in two lists: items and prices.
 * It calculates the total cost of the items by multiplying the quantity of each item with its respective price.
 * The function returns the total cost.
 *
 * Example:
 * val items = listOf("chair", "table", "lamp")
 * val prices = listOf(50, 100, 30)
 * calculateTotalCost(items, prices) => 350
 */
fun calculateTotalCost(items: List<String>, prices: List<Int>): Int {
/**
 * The calculateTotalCost function takes in two lists: items and prices.
 * It calculates the total cost of the items by multiplying the quantity of each item with its respective price.
 * The function returns the total cost.
 *
 * Example:
 * val items = listOf("chair", "table", "lamp")
 * val prices = listOf(50, 100, 30)
 * calculateTotalCost(items, prices) => 350
 */
fun calculateTotalCost(items: List<String>, prices: List<Int>): Int {

    var totalCost = 0

    for (i in items.indices) {
        val item = items[i]
        val price = prices[i]

        print("Enter the quantity of $item: ")
        val quantity = readLine()!!.toInt()

        val cost = quantity * price

        totalCost += cost
    }

    return totalCost
}