/**
 * This function calculates the total budget required for a design project based on the number of rooms and the
 * price per square foot of the materials.
 *
 * @param numRooms The number of rooms in the project.
 * @param pricePerSqft The price per square foot of the materials.
 * @return The total budget required for the design project.
 */
fun calculateDesignBudget(numRooms: Int, pricePerSqft: Float): Float {

    var totalArea = 0f
    val roomDimensions = mutableListOf<FloatArray>() // list to store dimensions of each room

    repeat(numRooms) { i ->
        print("Enter the length of room ${i + 1} in feet: ")
        val length = readLine()!!.toFloat()
        print("Enter the width of room ${i + 1} in feet: ")
        val width = readLine()!!.toFloat()
        print("Enter the height of room ${i + 1} in feet: ")
        val height = readLine()!!.toFloat()

        roomDimensions.add(floatArrayOf(length, width, height))
        totalArea += length * width // calculate total area
    }

    val budget = totalArea * pricePerSqft // calculating budget based on total area and price per sqft

    return budget
}
/**
 * This function calculates the total budget required for a design project based on the number of rooms and the
 * price per square foot of the materials.
 *
 * @param numRooms The number of rooms in the project.
 * @param pricePerSqft The price per square foot of the materials.
 * @return The total budget required for the design project.
 */
fun calculateDesignBudget(numRooms: Int, pricePerSqft: Float): Float {
/**
 * This function calculates the total budget required for a design project based on the number of rooms and the
 * price per square foot of the materials.
 *
 * @param numRooms The number of rooms in the project.
 * @param pricePerSqft The price per square foot of the materials.
 * @return The total budget required for the design project.
 */
fun calculateDesignBudget(numRooms: Int, pricePerSqft: Float): Float {

    var totalArea = 0f
    val roomDimensions = mutableListOf<FloatArray>() // list to store dimensions of each room

    repeat(numRooms) { i ->
        print("Enter the length of room ${i + 1} in feet: ")
        val length = readLine()!!.toFloat()
        print("Enter the width of room ${i + 1} in feet: ")
        val width = readLine()!!.toFloat()
        print("Enter the height of room ${i + 1} in feet: ")
        val height = readLine()!!.toFloat()

        roomDimensions.add(floatArrayOf(length, width, height))
        totalArea += length * width // calculate total area
    }

    val budget = totalArea * pricePerSqft // calculating budget based on total area and price per sqft

    return budget
}