/**
 * Calculates the area of a rectangular room.
 *
 * @param length The length of the room in meters.
 * @param width The width of the room in meters.
 * @return The area of the room in square meters.
 * @throws IllegalArgumentException If the given length or width is negative.
 */
fun calculateRoomArea(length: Double, width: Double): Double {

    if (length < 0 || width < 0) {
        throw IllegalArgumentException("Length and width must be non-negative.")
    }

    // Calculate the area
    val area = length * width

    return area
}
/**
 * Calculates the area of a rectangular room.
 *
 * @param length The length of the room in meters.
 * @param width The width of the room in meters.
 * @return The area of the room in square meters.
 * @throws IllegalArgumentException If the given length or width is negative.
 */
fun calculateRoomArea(length: Double, width: Double): Double {
/**
 * Calculates the area of a rectangular room.
 *
 * @param length The length of the room in meters.
 * @param width The width of the room in meters.
 * @return The area of the room in square meters.
 * @throws IllegalArgumentException If the given length or width is negative.
 */
fun calculateRoomArea(length: Double, width: Double): Double {

    if (length < 0 || width < 0) {
        throw IllegalArgumentException("Length and width must be non-negative.")
    }

    // Calculate the area
    val area = length * width

    return area
}