/**
 * You are an anthropologist studying the population of a remote island. The population of the island is represented
 * using floating-point numbers. Your task is to calculate the final population after performing various arithmetic
 * operations on the initial population using the ternary operator.
 *
 * @param num1 Initial population (floating-point number)
 * @param num2 Number of births (floating-point number)
 * @param num3 Number of deaths (floating-point number)
 * @return Final population after performing the arithmetic operations (floating-point number)
 */
fun ternaryFloatOperations(num1: Double, num2: Double, num3: Double): Double {

    // Perform ternary operator arithmetic operations to calculate the final population
    val population = if ((num1 >= 100 && num3 < num2) || (num1 < num3 && num2 > num1)) {
        num1 + num2 - num3
    } else {
        num1 - num2 + num3
    }
    
    return population
}
/**
 * You are an anthropologist studying the population of a remote island. The population of the island is represented
 * using floating-point numbers. Your task is to calculate the final population after performing various arithmetic
 * operations on the initial population using the ternary operator.
 *
 * @param num1 Initial population (floating-point number)
 * @param num2 Number of births (floating-point number)
 * @param num3 Number of deaths (floating-point number)
 * @return Final population after performing the arithmetic operations (floating-point number)
 */
fun ternaryFloatOperations(num1: Double, num2: Double, num3: Double): Double {
/**
 * You are an anthropologist studying the population of a remote island. The population of the island is represented
 * using floating-point numbers. Your task is to calculate the final population after performing various arithmetic
 * operations on the initial population using the ternary operator.
 *
 * @param num1 Initial population (floating-point number)
 * @param num2 Number of births (floating-point number)
 * @param num3 Number of deaths (floating-point number)
 * @return Final population after performing the arithmetic operations (floating-point number)
 */
fun ternaryFloatOperations(num1: Double, num2: Double, num3: Double): Double {

    // Perform ternary operator arithmetic operations to calculate the final population
    val population = if ((num1 >= 100 && num3 < num2) || (num1 < num3 && num2 > num1)) {
        num1 + num2 - num3
    } else {
        num1 - num2 + num3
    }
    
    return population
}