/**
 * Calculate the total area of all the rooms given their dimensions.
 * Separate each room area by a vertical bar "|".
 *
 * @param roomDimensions A list of tuples, where each tuple contains the
 * length and width of a room.
 * @return A string representing the calculated area of each room.
 *
 * Example:
 * calculateRoomArea(listOf(Pair(5, 7), Pair(8, 9), Pair(6, 10))) -> "Room 1 Area: 35 | Room 2 Area: 72 | Room 3 Area: 60"
 */
fun calculateRoomArea(roomDimensions: List<Pair<Int, Int>>): String {

    val roomAreas = mutableListOf<String>()
    roomDimensions.forEachIndexed { index, (length, width) ->
        val area = length * width
        val roomArea = "Room ${index + 1} Area: $area"
        roomAreas.add(roomArea)
    }

    return roomAreas.joinToString(" | ")
}
/**
 * Calculate the total area of all the rooms given their dimensions.
 * Separate each room area by a vertical bar "|".
 *
 * @param roomDimensions A list of tuples, where each tuple contains the
 * length and width of a room.
 * @return A string representing the calculated area of each room.
 *
 * Example:
 * calculateRoomArea(listOf(Pair(5, 7), Pair(8, 9), Pair(6, 10))) -> "Room 1 Area: 35 | Room 2 Area: 72 | Room 3 Area: 60"
 */
fun calculateRoomArea(roomDimensions: List<Pair<Int, Int>>): String {
/**
 * Calculate the total area of all the rooms given their dimensions.
 * Separate each room area by a vertical bar "|".
 *
 * @param roomDimensions A list of tuples, where each tuple contains the
 * length and width of a room.
 * @return A string representing the calculated area of each room.
 *
 * Example:
 * calculateRoomArea(listOf(Pair(5, 7), Pair(8, 9), Pair(6, 10))) -> "Room 1 Area: 35 | Room 2 Area: 72 | Room 3 Area: 60"
 */
fun calculateRoomArea(roomDimensions: List<Pair<Int, Int>>): String {

    val roomAreas = mutableListOf<String>()
    roomDimensions.forEachIndexed { index, (length, width) ->
        val area = length * width
        val roomArea = "Room ${index + 1} Area: $area"
        roomAreas.add(roomArea)
    }

    return roomAreas.joinToString(" | ")
}