/**
 * This function calculates the amount of paint needed for an interior design project, given the total area to be painted and the number of rooms.
 * It returns the estimated amount of paint coverage required for the entire project.
 */
fun calculatePaintCoverage(totalArea: Double, numRooms: Int): Double {

    // Calculate the average area per room
    val averageAreaPerRoom = totalArea / numRooms

    // Initialize the paint coverage required for the entire project
    var paintCoverage = 0.0

    // Iterate over each room
    repeat(numRooms) { room ->
        // Prompt the designer to enter the area of the current room
        print("Enter the area of room ${room + 1} (in square meters): ")
        val roomArea = readLine()!!.toDouble()

        // Calculate the paint coverage for the current room
        val roomPaintCoverage = roomArea / averageAreaPerRoom

        // Update the paint coverage required for the entire project
        paintCoverage += roomPaintCoverage
    }

    // Return the estimated amount of paint coverage required for the entire project
    return paintCoverage
}
/**
 * This function calculates the amount of paint needed for an interior design project, given the total area to be painted and the number of rooms.
 * It returns the estimated amount of paint coverage required for the entire project.
 */
fun calculatePaintCoverage(totalArea: Double, numRooms: Int): Double {
/**
 * This function calculates the amount of paint needed for an interior design project, given the total area to be painted and the number of rooms.
 * It returns the estimated amount of paint coverage required for the entire project.
 */
fun calculatePaintCoverage(totalArea: Double, numRooms: Int): Double {

    // Calculate the average area per room
    val averageAreaPerRoom = totalArea / numRooms

    // Initialize the paint coverage required for the entire project
    var paintCoverage = 0.0

    // Iterate over each room
    repeat(numRooms) { room ->
        // Prompt the designer to enter the area of the current room
        print("Enter the area of room ${room + 1} (in square meters): ")
        val roomArea = readLine()!!.toDouble()

        // Calculate the paint coverage for the current room
        val roomPaintCoverage = roomArea / averageAreaPerRoom

        // Update the paint coverage required for the entire project
        paintCoverage += roomPaintCoverage
    }

    // Return the estimated amount of paint coverage required for the entire project
    return paintCoverage
}