/**
 * Calculate the volume of different subdivisions in a civil engineering project.
 *
 * @param length The length of the project area.
 * @param width The width of the project area.
 * @param depth The depth of the project area.
 * @return The volume of each subdivision.
 */
fun calculateVolumes(length: Int, width: Int, depth: Int): List<Float> {

    val volumes = mutableListOf<Float>()
    val subdivisions = listOf(
        "Foundation",
        "Wall",
        "Column",
        "Beam",
        "Slab"
    )

    // Iterate over each subdivision
    for (subdivision in subdivisions) {
        var i = 1
        var volume = 0f

        // Outer loop iterating over length
        while (i <= length) {
            var j = 1

            // Nested loop iterating over width
            while (j <= width) {
                var k = 1

                // Nested loop iterating over depth
                while (k <= depth) {
                    // Calculate the volume
                    volume += i * j * k
                    k++
                }

                j++
            }

            i++
        }

        volumes.add(volume)
    }

    return volumes
}
/**
 * Calculate the volume of different subdivisions in a civil engineering project.
 *
 * @param length The length of the project area.
 * @param width The width of the project area.
 * @param depth The depth of the project area.
 * @return The volume of each subdivision.
 */
fun calculateVolumes(length: Int, width: Int, depth: Int): List<Float> {
/**
 * Calculate the volume of different subdivisions in a civil engineering project.
 *
 * @param length The length of the project area.
 * @param width The width of the project area.
 * @param depth The depth of the project area.
 * @return The volume of each subdivision.
 */
fun calculateVolumes(length: Int, width: Int, depth: Int): List<Float> {

    val volumes = mutableListOf<Float>()
    val subdivisions = listOf(
        "Foundation",
        "Wall",
        "Column",
        "Beam",
        "Slab"
    )

    // Iterate over each subdivision
    for (subdivision in subdivisions) {
        var i = 1
        var volume = 0f

        // Outer loop iterating over length
        while (i <= length) {
            var j = 1

            // Nested loop iterating over width
            while (j <= width) {
                var k = 1

                // Nested loop iterating over depth
                while (k <= depth) {
                    // Calculate the volume
                    volume += i * j * k
                    k++
                }

                j++
            }

            i++
        }

        volumes.add(volume)
    }

    return volumes
}