/**
 * This function calculates the size of a room based on its length, width, and height.
 * It returns a string indicating the size category of the room based on the following criteria:
 * - Small: if the total area is less than 20 square meters.
 * - Medium: if the total area is between 20 and 50 square meters.
 * - Large: if the total area is greater than 50 square meters.
 * - Invalid input: if any of the dimensions is negative or zero.
 *
 * @param length The length of the room.
 * @param width The width of the room.
 * @param height The height of the room.
 * @return The size category of the room.
 */
fun calculateRoomSize(length: Float, width: Float, height: Float): String {

    // Calculate the total area of the room as length * width
    val area = length * width

    // Check for invalid input
    if (length <= 0 || width <= 0 || height <= 0) {
        return "Invalid input"
    }

    // Check the size categories
    return when {
        area < 20 -> "Small"
        area in 20.0..50.0 -> "Medium"
        else -> "Large"
    }
}
/**
 * This function calculates the size of a room based on its length, width, and height.
 * It returns a string indicating the size category of the room based on the following criteria:
 * - Small: if the total area is less than 20 square meters.
 * - Medium: if the total area is between 20 and 50 square meters.
 * - Large: if the total area is greater than 50 square meters.
 * - Invalid input: if any of the dimensions is negative or zero.
 *
 * @param length The length of the room.
 * @param width The width of the room.
 * @param height The height of the room.
 * @return The size category of the room.
 */
fun calculateRoomSize(length: Float, width: Float, height: Float): String {
/**
 * This function calculates the size of a room based on its length, width, and height.
 * It returns a string indicating the size category of the room based on the following criteria:
 * - Small: if the total area is less than 20 square meters.
 * - Medium: if the total area is between 20 and 50 square meters.
 * - Large: if the total area is greater than 50 square meters.
 * - Invalid input: if any of the dimensions is negative or zero.
 *
 * @param length The length of the room.
 * @param width The width of the room.
 * @param height The height of the room.
 * @return The size category of the room.
 */
fun calculateRoomSize(length: Float, width: Float, height: Float): String {

    // Calculate the total area of the room as length * width
    val area = length * width

    // Check for invalid input
    if (length <= 0 || width <= 0 || height <= 0) {
        return "Invalid input"
    }

    // Check the size categories
    return when {
        area < 20 -> "Small"
        area in 20.0..50.0 -> "Medium"
        else -> "Large"
    }
}