/**
 * This exercise requires you to iterate over a specific range and perform complex conjugate and absolute value operations.
 *
 * Given a start and end point, your task is to iterate over the range and for each number, find its complex conjugate using the conjug() method and calculate its absolute value using the abs() method. Finally, return a list containing the results of these calculations.
 *
 * Example:
 *
 * conjugateAndAbsolute(1, 5)
 * Output: [1, 1, 3, 3, 5]
 *
 * Note: The example above represents the complex conjugate and absolute value of the numbers in the range [1, 5].
 */
fun conjugateAndAbsolute(start: Int, end: Int): List<Int> {

    val results = mutableListOf<Int>()

    for (num in start until end) {
        // Find the complex conjugate
        val conjugate = num.conjugate()

        // Calculate the absolute value
        val absolute = conjugate.absoluteValue()

        // Add the result to the list
        results.add(absolute.toInt())
    }

    return results
}

fun Int.conjugate(): Int {
    return this
}

fun Int.absoluteValue(): Int {
    return kotlin.math.abs(this)
}
/**
 * This exercise requires you to iterate over a specific range and perform complex conjugate and absolute value operations.
 *
 * Given a start and end point, your task is to iterate over the range and for each number, find its complex conjugate using the conjug() method and calculate its absolute value using the abs() method. Finally, return a list containing the results of these calculations.
 *
 * Example:
 *
 * conjugateAndAbsolute(1, 5)
 * Output: [1, 1, 3, 3, 5]
 *
 * Note: The example above represents the complex conjugate and absolute value of the numbers in the range [1, 5].
 */
fun conjugateAndAbsolute(start: Int, end: Int): List<Int> {
/**
 * This exercise requires you to iterate over a specific range and perform complex conjugate and absolute value operations.
 *
 * Given a start and end point, your task is to iterate over the range and for each number, find its complex conjugate using the conjug() method and calculate its absolute value using the abs() method. Finally, return a list containing the results of these calculations.
 *
 * Example:
 *
 * conjugateAndAbsolute(1, 5)
 * Output: [1, 1, 3, 3, 5]
 *
 * Note: The example above represents the complex conjugate and absolute value of the numbers in the range [1, 5].
 */
fun conjugateAndAbsolute(start: Int, end: Int): List<Int> {

    val results = mutableListOf<Int>()

    for (num in start until end) {
        // Find the complex conjugate
        val conjugate = num.conjugate()

        // Calculate the absolute value
        val absolute = conjugate.absoluteValue()

        // Add the result to the list
        results.add(absolute.toInt())
    }

    return results
}

fun Int.conjugate(): Int {
    return this
}

fun Int.absoluteValue(): Int {
    return kotlin.math.abs(this)
}