/**
 * This function takes in the real and imaginary parts of a complex number and returns the function call based on the quadrant.
 *
 * @param realPart The real part of the complex number.
 * @param imaginaryPart The imaginary part of the complex number.
 * @return The function call based on the quadrant in which the complex number lies.
 *
 * Example:
 * If realPart = 3 and imaginaryPart = 5, The complex number lies in Quadrant 1 and the function call should return 1.
 * If realPart = 3 and imaginaryPart = -5, The complex number lies in Quadrant 4 and the function call should return 4.
 */
fun findComplexNumber(realPart: Int, imaginaryPart: Int): Int {

    return when {
        realPart > 0 -> {
            when {
                imaginaryPart > 0 -> 1 // In Quadrant 1
                imaginaryPart < 0 -> 4 // In Quadrant 4
                else -> 9 // Imaginary part is 0, on positive x-axis
            }
        }
        realPart < 0 -> {
            when {
                imaginaryPart > 0 -> 2 // In Quadrant 2
                imaginaryPart < 0 -> 3 // In Quadrant 3
                else -> 9 // Imaginary part is 0, on negative x-axis
            }
        }
        else -> {
            when {
                imaginaryPart > 0 -> 2 // Imaginary part is not 0, on positive y-axis
                imaginaryPart < 0 -> 3 // Imaginary part is not 0, on negative y-axis
                else -> 0 // Both real and imaginary parts are 0
            }
        }
    }
}
/**
 * This function takes in the real and imaginary parts of a complex number and returns the function call based on the quadrant.
 *
 * @param realPart The real part of the complex number.
 * @param imaginaryPart The imaginary part of the complex number.
 * @return The function call based on the quadrant in which the complex number lies.
 *
 * Example:
 * If realPart = 3 and imaginaryPart = 5, The complex number lies in Quadrant 1 and the function call should return 1.
 * If realPart = 3 and imaginaryPart = -5, The complex number lies in Quadrant 4 and the function call should return 4.
 */
fun findComplexNumber(realPart: Int, imaginaryPart: Int): Int {
/**
 * This function takes in the real and imaginary parts of a complex number and returns the function call based on the quadrant.
 *
 * @param realPart The real part of the complex number.
 * @param imaginaryPart The imaginary part of the complex number.
 * @return The function call based on the quadrant in which the complex number lies.
 *
 * Example:
 * If realPart = 3 and imaginaryPart = 5, The complex number lies in Quadrant 1 and the function call should return 1.
 * If realPart = 3 and imaginaryPart = -5, The complex number lies in Quadrant 4 and the function call should return 4.
 */
fun findComplexNumber(realPart: Int, imaginaryPart: Int): Int {

    return when {
        realPart > 0 -> {
            when {
                imaginaryPart > 0 -> 1 // In Quadrant 1
                imaginaryPart < 0 -> 4 // In Quadrant 4
                else -> 9 // Imaginary part is 0, on positive x-axis
            }
        }
        realPart < 0 -> {
            when {
                imaginaryPart > 0 -> 2 // In Quadrant 2
                imaginaryPart < 0 -> 3 // In Quadrant 3
                else -> 9 // Imaginary part is 0, on negative x-axis
            }
        }
        else -> {
            when {
                imaginaryPart > 0 -> 2 // Imaginary part is not 0, on positive y-axis
                imaginaryPart < 0 -> 3 // Imaginary part is not 0, on negative y-axis
                else -> 0 // Both real and imaginary parts are 0
            }
        }
    }
}