/**
 * This exercise aims to practice basic loop syntax and nested loops with sets.
 * You are an electrician who needs to calculate the sum of the products of two sets of numbers.
 * Your task is to complete the function 'sumMultiply' which takes in two sets of numbers and returns the sum
 * of all the products of their elements.
 *
 * @param numbersSet1 A set containing integers
 * @param numbersSet2 A set containing integers
 * @return The sum of all the products of the elements between numbersSet1 and numbersSet2.
 */
fun sumMultiply(numbersSet1: Set<Int>, numbersSet2: Set<Int>): Int {

    var result = 0

    for (num1 in numbersSet1) {
        for (num2 in numbersSet2) {
            val product = num1 * num2
            result += product
        }
    }

    return result
}
/**
 * This exercise aims to practice basic loop syntax and nested loops with sets.
 * You are an electrician who needs to calculate the sum of the products of two sets of numbers.
 * Your task is to complete the function 'sumMultiply' which takes in two sets of numbers and returns the sum
 * of all the products of their elements.
 *
 * @param numbersSet1 A set containing integers
 * @param numbersSet2 A set containing integers
 * @return The sum of all the products of the elements between numbersSet1 and numbersSet2.
 */
fun sumMultiply(numbersSet1: Set<Int>, numbersSet2: Set<Int>): Int {
/**
 * This exercise aims to practice basic loop syntax and nested loops with sets.
 * You are an electrician who needs to calculate the sum of the products of two sets of numbers.
 * Your task is to complete the function 'sumMultiply' which takes in two sets of numbers and returns the sum
 * of all the products of their elements.
 *
 * @param numbersSet1 A set containing integers
 * @param numbersSet2 A set containing integers
 * @return The sum of all the products of the elements between numbersSet1 and numbersSet2.
 */
fun sumMultiply(numbersSet1: Set<Int>, numbersSet2: Set<Int>): Int {

    var result = 0

    for (num1 in numbersSet1) {
        for (num2 in numbersSet2) {
            val product = num1 * num2
            result += product
        }
    }

    return result
}