/**
 * This function divides the total area of a room evenly among the specified number of rooms.
 *
 * @param totalArea The total area of the room.
 * @param numRooms The number of rooms to divide the area into.
 * @return The area of each room after division.
 */
fun divideAreaByRooms(totalArea: Float, numRooms: Int): Float {

    if (numRooms == 0) {
        throw IllegalArgumentException("Cannot divide by zero!")
    }

    // Use the division assignment operator (/=) to divide the total area by the number of rooms
    var areaPerRoom = totalArea / numRooms

    return areaPerRoom
}

// Provided room dimensions
val roomSizes = listOf(10, 12)
/**
 * This function divides the total area of a room evenly among the specified number of rooms.
 *
 * @param totalArea The total area of the room.
 * @param numRooms The number of rooms to divide the area into.
 * @return The area of each room after division.
 */
fun divideAreaByRooms(totalArea: Float, numRooms: Int): Float {
/**
 * This function divides the total area of a room evenly among the specified number of rooms.
 *
 * @param totalArea The total area of the room.
 * @param numRooms The number of rooms to divide the area into.
 * @return The area of each room after division.
 */
fun divideAreaByRooms(totalArea: Float, numRooms: Int): Float {

    if (numRooms == 0) {
        throw IllegalArgumentException("Cannot divide by zero!")
    }

    // Use the division assignment operator (/=) to divide the total area by the number of rooms
    var areaPerRoom = totalArea / numRooms

    return areaPerRoom
}

// Provided room dimensions
val roomSizes = listOf(10, 12)