/**
 * A function that calculates the area of each room in a house.
 *
 * Given a list of room lengths and a list of room widths, this function calculates the area of each room in square meters.
 *
 * @param roomLengths A list of room lengths in meters.
 * @param roomWidths A list of room widths in meters.
 * @return A list of calculated areas for each room in square meters.
 */
fun calculateAreaOfRooms(roomLengths: List<Double>, roomWidths: List<Double>): List<Double> {

    val areas = mutableListOf<Double>()  // Initialize an empty list to store the calculated areas

    // Iterate over the indices of roomLengths and roomWidths
    for (i in roomLengths.indices) {
        val area = roomLengths[i] * roomWidths[i]  // Calculate the area of each room
        areas.add(area)  // Append the calculated area to the areas list
    }

    return areas
}

val roomLengths = listOf(3.0, 4.5, 2.7, 6.0)
val roomWidths = listOf(5.0, 9.0, 3.6, 8.2)

val areaOfRooms = calculateAreaOfRooms(roomLengths, roomWidths)  // Calculate the area of rooms
/**
 * A function that calculates the area of each room in a house.
 *
 * Given a list of room lengths and a list of room widths, this function calculates the area of each room in square meters.
 *
 * @param roomLengths A list of room lengths in meters.
 * @param roomWidths A list of room widths in meters.
 * @return A list of calculated areas for each room in square meters.
 */
fun calculateAreaOfRooms(roomLengths: List<Double>, roomWidths: List<Double>): List<Double> {
/**
 * A function that calculates the area of each room in a house.
 *
 * Given a list of room lengths and a list of room widths, this function calculates the area of each room in square meters.
 *
 * @param roomLengths A list of room lengths in meters.
 * @param roomWidths A list of room widths in meters.
 * @return A list of calculated areas for each room in square meters.
 */
fun calculateAreaOfRooms(roomLengths: List<Double>, roomWidths: List<Double>): List<Double> {

    val areas = mutableListOf<Double>()  // Initialize an empty list to store the calculated areas

    // Iterate over the indices of roomLengths and roomWidths
    for (i in roomLengths.indices) {
        val area = roomLengths[i] * roomWidths[i]  // Calculate the area of each room
        areas.add(area)  // Append the calculated area to the areas list
    }

    return areas
}

val roomLengths = listOf(3.0, 4.5, 2.7, 6.0)
val roomWidths = listOf(5.0, 9.0, 3.6, 8.2)

val areaOfRooms = calculateAreaOfRooms(roomLengths, roomWidths)  // Calculate the area of rooms