/**
 * This exercise requires creating a tuple using the tuple() function and understanding complex numbers.
 *
 * In this exercise, you need to create a tuple of complex numbers represented by real and imaginary parts.
 * The input consists of four integers: real1, imaginary1, real2, imaginary2.
 *
 * Your task is to create a tuple of complex numbers using the tuple() function, where each complex number in the
 * tuple is formed by pairing the real and imaginary parts.
 *
 * For example, if the input is real1=2, imaginary1=3, real2=4, imaginary2=5, the expected output is:
 * ((2+3j), (4+5j))
 *
 * Complete the code below to solve the exercise.
 */
fun createComplexTuple(real1: Int, imaginary1: Int, real2: Int, imaginary2: Int): Pair<Complex, Complex> {

    // Create a tuple of complex numbers using the given real and imaginary parts
    val complex1 = Complex(real1.toDouble(), imaginary1.toDouble())
    val complex2 = Complex(real2.toDouble(), imaginary2.toDouble())
    return Pair(complex1, complex2)
}

data class Complex(val real: Double, val imaginary: Double) {
    override fun toString(): String {
        return "($real+${imaginary}j)"
    }
}
/**
 * This exercise requires creating a tuple using the tuple() function and understanding complex numbers.
 *
 * In this exercise, you need to create a tuple of complex numbers represented by real and imaginary parts.
 * The input consists of four integers: real1, imaginary1, real2, imaginary2.
 *
 * Your task is to create a tuple of complex numbers using the tuple() function, where each complex number in the
 * tuple is formed by pairing the real and imaginary parts.
 *
 * For example, if the input is real1=2, imaginary1=3, real2=4, imaginary2=5, the expected output is:
 * ((2+3j), (4+5j))
 *
 * Complete the code below to solve the exercise.
 */
fun createComplexTuple(real1: Int, imaginary1: Int, real2: Int, imaginary2: Int): Pair<Complex, Complex> {
/**
 * This exercise requires creating a tuple using the tuple() function and understanding complex numbers.
 *
 * In this exercise, you need to create a tuple of complex numbers represented by real and imaginary parts.
 * The input consists of four integers: real1, imaginary1, real2, imaginary2.
 *
 * Your task is to create a tuple of complex numbers using the tuple() function, where each complex number in the
 * tuple is formed by pairing the real and imaginary parts.
 *
 * For example, if the input is real1=2, imaginary1=3, real2=4, imaginary2=5, the expected output is:
 * ((2+3j), (4+5j))
 *
 * Complete the code below to solve the exercise.
 */
fun createComplexTuple(real1: Int, imaginary1: Int, real2: Int, imaginary2: Int): Pair<Complex, Complex> {

    // Create a tuple of complex numbers using the given real and imaginary parts
    val complex1 = Complex(real1.toDouble(), imaginary1.toDouble())
    val complex2 = Complex(real2.toDouble(), imaginary2.toDouble())
    return Pair(complex1, complex2)
}

data class Complex(val real: Double, val imaginary: Double) {
    override fun toString(): String {
        return "($real+${imaginary}j)"
    }
}