/**
 * This exercise aims to test your understanding of looping through tuples and utilizing the break statement in Kotlin.
 * You are assigned to work as a Civil Engineer and your task is to analyze the cross-section of a road pavement.
 * The cross_section is provided as a list where each element represents the thickness of different layers of the pavement.
 * Your job is to find the index of the first occurrence where the thickness of the layer exceeds 20 cm. If there is
 * no such layer, return -1.
 */
fun loopingThroughTuples(crossSection: List<Int>): Int {

    // Iterate through the crossSection list
    for ((index, thickness) in crossSection.withIndex()) {
        // Check if thickness exceeds 20 cm. If true, return index
        if (thickness > 20) {
            return index
        }
    }
    // Return -1 if no layer exceeds 20 cm
    return -1
}
/**
 * This exercise aims to test your understanding of looping through tuples and utilizing the break statement in Kotlin.
 * You are assigned to work as a Civil Engineer and your task is to analyze the cross-section of a road pavement.
 * The cross_section is provided as a list where each element represents the thickness of different layers of the pavement.
 * Your job is to find the index of the first occurrence where the thickness of the layer exceeds 20 cm. If there is
 * no such layer, return -1.
 */
fun loopingThroughTuples(crossSection: List<Int>): Int {
/**
 * This exercise aims to test your understanding of looping through tuples and utilizing the break statement in Kotlin.
 * You are assigned to work as a Civil Engineer and your task is to analyze the cross-section of a road pavement.
 * The cross_section is provided as a list where each element represents the thickness of different layers of the pavement.
 * Your job is to find the index of the first occurrence where the thickness of the layer exceeds 20 cm. If there is
 * no such layer, return -1.
 */
fun loopingThroughTuples(crossSection: List<Int>): Int {

    // Iterate through the crossSection list
    for ((index, thickness) in crossSection.withIndex()) {
        // Check if thickness exceeds 20 cm. If true, return index
        if (thickness > 20) {
            return index
        }
    }
    // Return -1 if no layer exceeds 20 cm
    return -1
}