/**
 * This function takes in the real and imaginary parts of a complex number and returns its string representation
 * in the form 'x + yi', where x is the real part and y is the imaginary part.
 */
fun complexNumberRepresentation(realPart: Int, imaginaryPart: Int): String {

    if (realPart == 0 && imaginaryPart == 0) {
        return "0"  // Complex number is zero, return "0"
    }

    if (realPart == 0) {
        return "$imaginaryPart"
    }

    if (imaginaryPart == 0) {
        return "$realPart"
    }

    val sign = if (imaginaryPart > 0) "+" else "-"
    return "$realPart $sign ${Math.abs(imaginaryPart)}i"
}
/**
 * This function takes in the real and imaginary parts of a complex number and returns its string representation
 * in the form 'x + yi', where x is the real part and y is the imaginary part.
 */
fun complexNumberRepresentation(realPart: Int, imaginaryPart: Int): String {
/**
 * This function takes in the real and imaginary parts of a complex number and returns its string representation
 * in the form 'x + yi', where x is the real part and y is the imaginary part.
 */
fun complexNumberRepresentation(realPart: Int, imaginaryPart: Int): String {

    if (realPart == 0 && imaginaryPart == 0) {
        return "0"  // Complex number is zero, return "0"
    }

    if (realPart == 0) {
        return "$imaginaryPart"
    }

    if (imaginaryPart == 0) {
        return "$realPart"
    }

    val sign = if (imaginaryPart > 0) "+" else "-"
    return "$realPart $sign ${Math.abs(imaginaryPart)}i"
}