/**
 * This exercise requires you to find the intersection of two sets of numbers and then format the output as a string.
 *
 * Given two sets of numbers, find the numbers that appear in both sets. Concatenate these numbers into a string where each number is separated by a comma and a space. Return the formatted string.
 *
 * @param numbers A pair of sets of numbers.
 * @return A string representation of the numbers that appear in both sets, formatted as "number1, number2, ...".
 *
 * Example:
 * numbers = (setOf(1, 2, 3, 4, 5), setOf(4, 5, 6, 7, 8))
 * intersectionOfAndOperatorAndStringFormatting(numbers) => "4, 5"
 */
fun intersectionOfAndOperatorAndStringFormatting(numbers: Pair<Set<Int>, Set<Int>>): String {

    val intersection = numbers.first.intersect(numbers.second)
    val formattedString = intersection.joinToString(", ")
    return formattedString
}
/**
 * This exercise requires you to find the intersection of two sets of numbers and then format the output as a string.
 *
 * Given two sets of numbers, find the numbers that appear in both sets. Concatenate these numbers into a string where each number is separated by a comma and a space. Return the formatted string.
 *
 * @param numbers A pair of sets of numbers.
 * @return A string representation of the numbers that appear in both sets, formatted as "number1, number2, ...".
 *
 * Example:
 * numbers = (setOf(1, 2, 3, 4, 5), setOf(4, 5, 6, 7, 8))
 * intersectionOfAndOperatorAndStringFormatting(numbers) => "4, 5"
 */
fun intersectionOfAndOperatorAndStringFormatting(numbers: Pair<Set<Int>, Set<Int>>): String {
/**
 * This exercise requires you to find the intersection of two sets of numbers and then format the output as a string.
 *
 * Given two sets of numbers, find the numbers that appear in both sets. Concatenate these numbers into a string where each number is separated by a comma and a space. Return the formatted string.
 *
 * @param numbers A pair of sets of numbers.
 * @return A string representation of the numbers that appear in both sets, formatted as "number1, number2, ...".
 *
 * Example:
 * numbers = (setOf(1, 2, 3, 4, 5), setOf(4, 5, 6, 7, 8))
 * intersectionOfAndOperatorAndStringFormatting(numbers) => "4, 5"
 */
fun intersectionOfAndOperatorAndStringFormatting(numbers: Pair<Set<Int>, Set<Int>>): String {

    val intersection = numbers.first.intersect(numbers.second)
    val formattedString = intersection.joinToString(", ")
    return formattedString
}