/**
 * This exercise focuses on adding elements to a set and breaking out of a loop.
 */
fun addBreakLoopElementsSet(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    // Initialize an empty set
    val resultSet = mutableSetOf<Int>()

    // Iterate over the elements in set1
    for (elem1 in set1) {
        // Iterate over the elements in set2
        for (elem2 in set2) {
            // Check if the elements are equal
            if (elem1 == elem2) {
                // Add the element to the resultSet
                resultSet.add(elem1)
                // Break out of the inner loop
                break
            }
        }
    }

    // Return the resulting set
    return resultSet
}
/**
 * This exercise focuses on adding elements to a set and breaking out of a loop.
 */
fun addBreakLoopElementsSet(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This exercise focuses on adding elements to a set and breaking out of a loop.
 */
fun addBreakLoopElementsSet(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    // Initialize an empty set
    val resultSet = mutableSetOf<Int>()

    // Iterate over the elements in set1
    for (elem1 in set1) {
        // Iterate over the elements in set2
        for (elem2 in set2) {
            // Check if the elements are equal
            if (elem1 == elem2) {
                // Add the element to the resultSet
                resultSet.add(elem1)
                // Break out of the inner loop
                break
            }
        }
    }

    // Return the resulting set
    return resultSet
}