/**
 * In civil engineering, excavation is a common task. For a given volume in cubic meters and the ground level in
 * meters above a reference point, this function calculates the target level in meters below the reference point
 * after excavation using a while loop and the subtraction assignment operator. The function returns the target
 * level after excavation.
 *
 * Example:
 * volume: 500
 * ground_level: 10
 * target_level: -10
 *
 * Result: 30
 */
fun calculateExcavationVolume(volume: Int, groundLevel: Int, targetLevel: Int): Int {

    var remainingVolume = volume
    var finalTargetLevel = targetLevel

    // Calculate the target level after excavation
    while (remainingVolume > 0) {
        remainingVolume--
        finalTargetLevel--
    }

    return finalTargetLevel
}
/**
 * In civil engineering, excavation is a common task. For a given volume in cubic meters and the ground level in
 * meters above a reference point, this function calculates the target level in meters below the reference point
 * after excavation using a while loop and the subtraction assignment operator. The function returns the target
 * level after excavation.
 *
 * Example:
 * volume: 500
 * ground_level: 10
 * target_level: -10
 *
 * Result: 30
 */
fun calculateExcavationVolume(volume: Int, groundLevel: Int, targetLevel: Int): Int {
/**
 * In civil engineering, excavation is a common task. For a given volume in cubic meters and the ground level in
 * meters above a reference point, this function calculates the target level in meters below the reference point
 * after excavation using a while loop and the subtraction assignment operator. The function returns the target
 * level after excavation.
 *
 * Example:
 * volume: 500
 * ground_level: 10
 * target_level: -10
 *
 * Result: 30
 */
fun calculateExcavationVolume(volume: Int, groundLevel: Int, targetLevel: Int): Int {

    var remainingVolume = volume
    var finalTargetLevel = targetLevel

    // Calculate the target level after excavation
    while (remainingVolume > 0) {
        remainingVolume--
        finalTargetLevel--
    }

    return finalTargetLevel
}