/**
 * Given two matrices: matrix1 and matrix2, modify the elements of matrix1 using slicing.
 * Break the nested loop using the 'break' statement if the elements in matrix2 are divisible by 2.
 * Skip iterating through the rest of the elements of a row using the 'continue' statement if the sum
 * of the elements in matrix1 exceeds 100.
 *
 * @param matrix1 The first matrix
 * @param matrix2 The second matrix
 * @return The modified matrix1
 */
fun modifyElements(matrix1: Array<IntArray>, matrix2: Array<IntArray>): Array<IntArray> {

    for (i in matrix1.indices) {
        for (j in matrix1[i].indices) {
            if (matrix1[i][j] % 2 == 0) {
                matrix1[i][j] += 10
                break
            }
            if (matrix1[i].sum() > 100) {
                continue
            }
            matrix1[i][j] += 5
        }
    }
    return matrix1
}
/**
 * Given two matrices: matrix1 and matrix2, modify the elements of matrix1 using slicing.
 * Break the nested loop using the 'break' statement if the elements in matrix2 are divisible by 2.
 * Skip iterating through the rest of the elements of a row using the 'continue' statement if the sum
 * of the elements in matrix1 exceeds 100.
 *
 * @param matrix1 The first matrix
 * @param matrix2 The second matrix
 * @return The modified matrix1
 */
fun modifyElements(matrix1: Array<IntArray>, matrix2: Array<IntArray>): Array<IntArray> {
/**
 * Given two matrices: matrix1 and matrix2, modify the elements of matrix1 using slicing.
 * Break the nested loop using the 'break' statement if the elements in matrix2 are divisible by 2.
 * Skip iterating through the rest of the elements of a row using the 'continue' statement if the sum
 * of the elements in matrix1 exceeds 100.
 *
 * @param matrix1 The first matrix
 * @param matrix2 The second matrix
 * @return The modified matrix1
 */
fun modifyElements(matrix1: Array<IntArray>, matrix2: Array<IntArray>): Array<IntArray> {

    for (i in matrix1.indices) {
        for (j in matrix1[i].indices) {
            if (matrix1[i][j] % 2 == 0) {
                matrix1[i][j] += 10
                break
            }
            if (matrix1[i].sum() > 100) {
                continue
            }
            matrix1[i][j] += 5
        }
    }
    return matrix1
}