/**
 * This exercise requires you to write a function that takes three floating-point numbers as inputs and returns the maximum 
 * absolute value among them without using the ternary operator.
 * 
 * @param x First floating-point number
 * @param y Second floating-point number
 * @param z Third floating-point number
 * @return The maximum absolute value among x, y, and z
 */
fun maxAbsoluteValue(x: Double, y: Double, z: Double): Double {

    var maxValue = Double.NEGATIVE_INFINITY

    // Check if x is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (x > maxValue || Math.abs(x) > maxValue) {
        maxValue = Math.abs(x)
    }

    // Check if y is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (y > maxValue || Math.abs(y) > maxValue) {
        maxValue = Math.abs(y)
    }

    // Check if z is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (z > maxValue || Math.abs(z) > maxValue) {
        maxValue = Math.abs(z)
    }

    return maxValue
}
/**
 * This exercise requires you to write a function that takes three floating-point numbers as inputs and returns the maximum 
 * absolute value among them without using the ternary operator.
 * 
 * @param x First floating-point number
 * @param y Second floating-point number
 * @param z Third floating-point number
 * @return The maximum absolute value among x, y, and z
 */
fun maxAbsoluteValue(x: Double, y: Double, z: Double): Double {
/**
 * This exercise requires you to write a function that takes three floating-point numbers as inputs and returns the maximum 
 * absolute value among them without using the ternary operator.
 * 
 * @param x First floating-point number
 * @param y Second floating-point number
 * @param z Third floating-point number
 * @return The maximum absolute value among x, y, and z
 */
fun maxAbsoluteValue(x: Double, y: Double, z: Double): Double {

    var maxValue = Double.NEGATIVE_INFINITY

    // Check if x is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (x > maxValue || Math.abs(x) > maxValue) {
        maxValue = Math.abs(x)
    }

    // Check if y is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (y > maxValue || Math.abs(y) > maxValue) {
        maxValue = Math.abs(y)
    }

    // Check if z is greater than the current maxValue or if its absolute value is greater than the current maxValue
    if (z > maxValue || Math.abs(z) > maxValue) {
        maxValue = Math.abs(z)
    }

    return maxValue
}