/**
 * This exercise aims to test your knowledge on using the ternary operator with multiple conditions and the 'not equal' operator.
 *
 * You need to complete the function 'ternaryOperatorExample()' so that it returns the maximum value among three numbers.
 * If two or more numbers are equal, the function should return 'null'.
 *
 * @param num1 an integer representing the first number
 * @param num2 an integer representing the second number
 * @param num3 an integer representing the third number
 *
 * @return the maximum value among the three numbers or null if two or more numbers are equal
 *
 * Example:
 * ternaryOperatorExample(5, 8, 2)
 * Output: 8
 *
 * ternaryOperatorExample(9, 3, 9)
 * Output: null
 */
fun ternaryOperatorExample(num1: Int, num2: Int, num3: Int): Int? {

    return if (num1 != num2 && num1 != num3) {
        num1
    } else if (num2 != num1 && num2 != num3) {
        null
    } else {
        null
    }
}
/**
 * This exercise aims to test your knowledge on using the ternary operator with multiple conditions and the 'not equal' operator.
 *
 * You need to complete the function 'ternaryOperatorExample()' so that it returns the maximum value among three numbers.
 * If two or more numbers are equal, the function should return 'null'.
 *
 * @param num1 an integer representing the first number
 * @param num2 an integer representing the second number
 * @param num3 an integer representing the third number
 *
 * @return the maximum value among the three numbers or null if two or more numbers are equal
 *
 * Example:
 * ternaryOperatorExample(5, 8, 2)
 * Output: 8
 *
 * ternaryOperatorExample(9, 3, 9)
 * Output: null
 */
fun ternaryOperatorExample(num1: Int, num2: Int, num3: Int): Int? {
/**
 * This exercise aims to test your knowledge on using the ternary operator with multiple conditions and the 'not equal' operator.
 *
 * You need to complete the function 'ternaryOperatorExample()' so that it returns the maximum value among three numbers.
 * If two or more numbers are equal, the function should return 'null'.
 *
 * @param num1 an integer representing the first number
 * @param num2 an integer representing the second number
 * @param num3 an integer representing the third number
 *
 * @return the maximum value among the three numbers or null if two or more numbers are equal
 *
 * Example:
 * ternaryOperatorExample(5, 8, 2)
 * Output: 8
 *
 * ternaryOperatorExample(9, 3, 9)
 * Output: null
 */
fun ternaryOperatorExample(num1: Int, num2: Int, num3: Int): Int? {

    return if (num1 != num2 && num1 != num3) {
        num1
    } else if (num2 != num1 && num2 != num3) {
        null
    } else {
        null
    }
}