/**
 * This function calculates the total cost of interior designing for a given list of room sizes and price per square foot.
 *
 * @param roomSizes List of room sizes in square feet.
 * @param pricePerSqft Price per square foot for the interior designing.
 * @return Total cost of interior designing.
 */
fun calculateTotalCost(roomSizes: List<Double>, pricePerSqft: Double): Double {

    var totalCost = 0.0

    // Iterates through each room size in the list
    var index = 0
    while (index < roomSizes.size) {
        val roomSize = roomSizes[index]

        // Calculates the cost for the current room
        val roomCost = roomSize * pricePerSqft

        // Adds the cost of the current room to the total cost
        totalCost += roomCost

        // Increment the index for the next room
        index++
    }

    return totalCost
}
/**
 * This function calculates the total cost of interior designing for a given list of room sizes and price per square foot.
 *
 * @param roomSizes List of room sizes in square feet.
 * @param pricePerSqft Price per square foot for the interior designing.
 * @return Total cost of interior designing.
 */
fun calculateTotalCost(roomSizes: List<Double>, pricePerSqft: Double): Double {
/**
 * This function calculates the total cost of interior designing for a given list of room sizes and price per square foot.
 *
 * @param roomSizes List of room sizes in square feet.
 * @param pricePerSqft Price per square foot for the interior designing.
 * @return Total cost of interior designing.
 */
fun calculateTotalCost(roomSizes: List<Double>, pricePerSqft: Double): Double {

    var totalCost = 0.0

    // Iterates through each room size in the list
    var index = 0
    while (index < roomSizes.size) {
        val roomSize = roomSizes[index]

        // Calculates the cost for the current room
        val roomCost = roomSize * pricePerSqft

        // Adds the cost of the current room to the total cost
        totalCost += roomCost

        // Increment the index for the next room
        index++
    }

    return totalCost
}