/**
 * This function calculates the statistics for a building given the number of floors, rooms, and windows.
 *
 * @param floors The number of floors in the building.
 * @param rooms The number of rooms per floor.
 * @param windows The number of windows per room.
 * @return A string indicating the statistics of the building.
 * @throws IllegalArgumentException If any of the input parameters is less than or equal to zero.
 *
 * Example:
 * calculateBuildingStats(3, 5, 2) returns "The building has 3 floors, each floor has 5 rooms, and each room has 2 windows."
 */
fun calculateBuildingStats(floors: Int, rooms: Int, windows: Int): String {

    if (floors <= 0 || rooms <= 0 || windows <= 0) {
        throw IllegalArgumentException("All input parameters must be greater than zero.")
    }

    return if (floors == 1) {
        "The building has 1 floor, each floor has $rooms rooms, and each room has $windows windows."
    } else {
        if (rooms == 1) {
            "The building has $floors floors, each floor has 1 room, and each room has $windows windows."
        } else {
            "The building has $floors floors, each floor has $rooms rooms, and each room has $windows windows."
        }
    }
}
/**
 * This function calculates the statistics for a building given the number of floors, rooms, and windows.
 *
 * @param floors The number of floors in the building.
 * @param rooms The number of rooms per floor.
 * @param windows The number of windows per room.
 * @return A string indicating the statistics of the building.
 * @throws IllegalArgumentException If any of the input parameters is less than or equal to zero.
 *
 * Example:
 * calculateBuildingStats(3, 5, 2) returns "The building has 3 floors, each floor has 5 rooms, and each room has 2 windows."
 */
fun calculateBuildingStats(floors: Int, rooms: Int, windows: Int): String {
/**
 * This function calculates the statistics for a building given the number of floors, rooms, and windows.
 *
 * @param floors The number of floors in the building.
 * @param rooms The number of rooms per floor.
 * @param windows The number of windows per room.
 * @return A string indicating the statistics of the building.
 * @throws IllegalArgumentException If any of the input parameters is less than or equal to zero.
 *
 * Example:
 * calculateBuildingStats(3, 5, 2) returns "The building has 3 floors, each floor has 5 rooms, and each room has 2 windows."
 */
fun calculateBuildingStats(floors: Int, rooms: Int, windows: Int): String {

    if (floors <= 0 || rooms <= 0 || windows <= 0) {
        throw IllegalArgumentException("All input parameters must be greater than zero.")
    }

    return if (floors == 1) {
        "The building has 1 floor, each floor has $rooms rooms, and each room has $windows windows."
    } else {
        if (rooms == 1) {
            "The building has $floors floors, each floor has 1 room, and each room has $windows windows."
        } else {
            "The building has $floors floors, each floor has $rooms rooms, and each room has $windows windows."
        }
    }
}