/**
 * Given a list of room dimensions (length and width), calculate the total area of all the rooms.
 *
 * @param roomDimensions A list of pairs where each pair represents the length and width of a room.
 * @return The total area of all the rooms.
 */
fun calculateTotalArea(roomDimensions: List<Pair<Int, Int>>): Float {

    var totalArea = 0f

    // Iterate through each room's dimensions
    for (dimensions in roomDimensions) {
        val (length, width) = dimensions

        // Calculate the area of the room by multiplying length and width
        val area = length * width

        // Add the area of the room to the total area
        totalArea += area
    }

    return totalArea
}
/**
 * Given a list of room dimensions (length and width), calculate the total area of all the rooms.
 *
 * @param roomDimensions A list of pairs where each pair represents the length and width of a room.
 * @return The total area of all the rooms.
 */
fun calculateTotalArea(roomDimensions: List<Pair<Int, Int>>): Float {
/**
 * Given a list of room dimensions (length and width), calculate the total area of all the rooms.
 *
 * @param roomDimensions A list of pairs where each pair represents the length and width of a room.
 * @return The total area of all the rooms.
 */
fun calculateTotalArea(roomDimensions: List<Pair<Int, Int>>): Float {

    var totalArea = 0f

    // Iterate through each room's dimensions
    for (dimensions in roomDimensions) {
        val (length, width) = dimensions

        // Calculate the area of the room by multiplying length and width
        val area = length * width

        // Add the area of the room to the total area
        totalArea += area
    }

    return totalArea
}