/**
 * This function calculates the estimated costs for a given number of rooms in an interior design project.
 *
 * @param numRooms The number of rooms in the project.
 * @param totalBudget The total budget allocated for the project.
 * @return The estimated costs for the design of the rooms.
 */
fun calculateDesignCosts(numRooms: Int, totalBudget: Double): Double {

    var roomCount = 0
    var totalCosts = 0.0

    while (roomCount < numRooms && totalCosts <= totalBudget) {
        roomCount++

        // Code to calculate and add costs for each room
        print("Enter the area of room $roomCount in square meters: ")
        val roomArea = readLine()!!.toDouble()
        print("Enter the cost of paint per square meter for room $roomCount: ")
        val paintCost = readLine()!!.toDouble()
        print("Enter the labor cost per square meter for room $roomCount: ")
        val laborCost = readLine()!!.toDouble()

        val roomCosts = roomArea * (paintCost + laborCost)
        totalCosts += roomCosts
    }

    return totalCosts
}
/**
 * This function calculates the estimated costs for a given number of rooms in an interior design project.
 *
 * @param numRooms The number of rooms in the project.
 * @param totalBudget The total budget allocated for the project.
 * @return The estimated costs for the design of the rooms.
 */
fun calculateDesignCosts(numRooms: Int, totalBudget: Double): Double {
/**
 * This function calculates the estimated costs for a given number of rooms in an interior design project.
 *
 * @param numRooms The number of rooms in the project.
 * @param totalBudget The total budget allocated for the project.
 * @return The estimated costs for the design of the rooms.
 */
fun calculateDesignCosts(numRooms: Int, totalBudget: Double): Double {

    var roomCount = 0
    var totalCosts = 0.0

    while (roomCount < numRooms && totalCosts <= totalBudget) {
        roomCount++

        // Code to calculate and add costs for each room
        print("Enter the area of room $roomCount in square meters: ")
        val roomArea = readLine()!!.toDouble()
        print("Enter the cost of paint per square meter for room $roomCount: ")
        val paintCost = readLine()!!.toDouble()
        print("Enter the labor cost per square meter for room $roomCount: ")
        val laborCost = readLine()!!.toDouble()

        val roomCosts = roomArea * (paintCost + laborCost)
        totalCosts += roomCosts
    }

    return totalCosts
}