/**
 * Calculate the result using a nested ternary operator
 */
fun nestedTernaryOperation(x: Int, y: Int, z: Int): Int {

    val result = if (x > y) x else if (y < z) y else if (z >= x) z else y
    return result
}
/**
 * Calculate the result using a nested ternary operator
 */
fun nestedTernaryOperation(x: Int, y: Int, z: Int): Int {
/**
 * Calculate the result using a nested ternary operator
 */
fun nestedTernaryOperation(x: Int, y: Int, z: Int): Int {

    val result = if (x > y) x else if (y < z) y else if (z >= x) z else y
    return result
}