/**
 * This function calculates the size of a beam based on the given material, width, depth, and moment.
 *
 * @param material The material of the beam (e.g., steel, concrete)
 * @param width The width of the beam in meters
 * @param depth The depth of the beam in meters
 * @param moment The required moment capacity of the beam in Newton-meters
 * @return A string indicating the size of the recommended beam
 */
fun calculateBeamDesign(material: String, width: Double, depth: Double, moment: Double): String {

    return when {
        material == "steel" -> {
            when {
                width in 0.3..0.6 -> {
                    when {
                        depth in 0.4..0.8 -> {
                            if (moment <= 100) {
                                "Beam size 1"
                            } else {
                                "Beam size 2"
                            }
                        }
                        else -> "Beam size 3"
                    }
                }
                else -> "Beam size 4"
            }
        }
        else -> {
            when {
                width in 0.3..0.6 -> {
                    when {
                        depth in 0.4..0.8 -> {
                            if (moment <= 100) {
                                "Beam size 5"
                            } else {
                                "Beam size 6"
                            }
                        }
                        else -> "Beam size 7"
                    }
                }
                else -> "Beam size 8"
            }
        }
    }
}
/**
 * This function calculates the size of a beam based on the given material, width, depth, and moment.
 *
 * @param material The material of the beam (e.g., steel, concrete)
 * @param width The width of the beam in meters
 * @param depth The depth of the beam in meters
 * @param moment The required moment capacity of the beam in Newton-meters
 * @return A string indicating the size of the recommended beam
 */
fun calculateBeamDesign(material: String, width: Double, depth: Double, moment: Double): String {
/**
 * This function calculates the size of a beam based on the given material, width, depth, and moment.
 *
 * @param material The material of the beam (e.g., steel, concrete)
 * @param width The width of the beam in meters
 * @param depth The depth of the beam in meters
 * @param moment The required moment capacity of the beam in Newton-meters
 * @return A string indicating the size of the recommended beam
 */
fun calculateBeamDesign(material: String, width: Double, depth: Double, moment: Double): String {

    return when {
        material == "steel" -> {
            when {
                width in 0.3..0.6 -> {
                    when {
                        depth in 0.4..0.8 -> {
                            if (moment <= 100) {
                                "Beam size 1"
                            } else {
                                "Beam size 2"
                            }
                        }
                        else -> "Beam size 3"
                    }
                }
                else -> "Beam size 4"
            }
        }
        else -> {
            when {
                width in 0.3..0.6 -> {
                    when {
                        depth in 0.4..0.8 -> {
                            if (moment <= 100) {
                                "Beam size 5"
                            } else {
                                "Beam size 6"
                            }
                        }
                        else -> "Beam size 7"
                    }
                }
                else -> "Beam size 8"
            }
        }
    }
}