/**
 * This function takes two sets of numbers as input and returns the common elements
 * between them as a new set.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val commonElements = mutableSetOf<Int>()

    // Iterate through each element in set1
    for (element in set1) {
        // If the element is also present in set2, add it to the commonElements set
        if (element in set2) {
            commonElements.add(element)
        }
    }

    return commonElements
}

// Sample test cases for the function
/**
 * This function takes two sets of numbers as input and returns the common elements
 * between them as a new set.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This function takes two sets of numbers as input and returns the common elements
 * between them as a new set.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val commonElements = mutableSetOf<Int>()

    // Iterate through each element in set1
    for (element in set1) {
        // If the element is also present in set2, add it to the commonElements set
        if (element in set2) {
            commonElements.add(element)
        }
    }

    return commonElements
}

// Sample test cases for the function