/**
 * This function demonstrates the usage of the addition assignment operator and the syntax of the ternary operator.
 * It takes two numbers, num1 and num2, and a condition, and performs addition based on the condition using the
 * ternary operator. The calculated value is then added to num1 using the addition assignment operator.
 *
 * @param num1 an integer representing the initial value
 * @param num2 an integer representing the value to be added
 * @param condition a boolean value determining whether to add num2 or not
 * @return The updated value of num1 after performing addition based on the condition
 */
fun ternaryAdditionAssignment(num1: Int, num2: Int, condition: Boolean): Int {

    // Perform addition based on the condition using the ternary operator and update num1 with the result
    val result = num1 + if (condition) num2 else 0
    return result
}
/**
 * This function demonstrates the usage of the addition assignment operator and the syntax of the ternary operator.
 * It takes two numbers, num1 and num2, and a condition, and performs addition based on the condition using the
 * ternary operator. The calculated value is then added to num1 using the addition assignment operator.
 *
 * @param num1 an integer representing the initial value
 * @param num2 an integer representing the value to be added
 * @param condition a boolean value determining whether to add num2 or not
 * @return The updated value of num1 after performing addition based on the condition
 */
fun ternaryAdditionAssignment(num1: Int, num2: Int, condition: Boolean): Int {
/**
 * This function demonstrates the usage of the addition assignment operator and the syntax of the ternary operator.
 * It takes two numbers, num1 and num2, and a condition, and performs addition based on the condition using the
 * ternary operator. The calculated value is then added to num1 using the addition assignment operator.
 *
 * @param num1 an integer representing the initial value
 * @param num2 an integer representing the value to be added
 * @param condition a boolean value determining whether to add num2 or not
 * @return The updated value of num1 after performing addition based on the condition
 */
fun ternaryAdditionAssignment(num1: Int, num2: Int, condition: Boolean): Int {

    // Perform addition based on the condition using the ternary operator and update num1 with the result
    val result = num1 + if (condition) num2 else 0
    return result
}