/**
 * Write a function that takes three integer arguments x, y, and z. The function should use the ternary operator to determine if x is equal to y.
 * If x is equal to y, the function should print "x is equal to y" and then use a loop to print the numbers from 1 to z.
 * If x is not equal to y, the function should print "x is not equal to y" and then use another loop to print the numbers from z to 1 in descending order.
 * The loops should be implemented using while loops and loop control keywords (break and continue), making it challenging.
 */
fun ternaryLoopControl(x: Int, y: Int, z: Int) {

    val result = if (x == y) "x is equal to y" else "x is not equal to y"

    if (x == y) {
        var i = 1
        while (i <= z) {
            println(i)
            i++
        }
    } else {
        var i = z
        while (i >= 1) {
            println(i)
            i--
        }
    }
}
/**
 * Write a function that takes three integer arguments x, y, and z. The function should use the ternary operator to determine if x is equal to y.
 * If x is equal to y, the function should print "x is equal to y" and then use a loop to print the numbers from 1 to z.
 * If x is not equal to y, the function should print "x is not equal to y" and then use another loop to print the numbers from z to 1 in descending order.
 * The loops should be implemented using while loops and loop control keywords (break and continue), making it challenging.
 */
fun ternaryLoopControl(x: Int, y: Int, z: Int) {
/**
 * Write a function that takes three integer arguments x, y, and z. The function should use the ternary operator to determine if x is equal to y.
 * If x is equal to y, the function should print "x is equal to y" and then use a loop to print the numbers from 1 to z.
 * If x is not equal to y, the function should print "x is not equal to y" and then use another loop to print the numbers from z to 1 in descending order.
 * The loops should be implemented using while loops and loop control keywords (break and continue), making it challenging.
 */
fun ternaryLoopControl(x: Int, y: Int, z: Int) {

    val result = if (x == y) "x is equal to y" else "x is not equal to y"

    if (x == y) {
        var i = 1
        while (i <= z) {
            println(i)
            i++
        }
    } else {
        var i = z
        while (i >= 1) {
            println(i)
            i--
        }
    }
}