/**
 * This function takes two integers, num1 and num2, and performs a complicated operation involving both
 * the Left and Right Shift Operators as well as the Multiplication Assignment Operator. It returns the final result.
 *
 * @param num1 The first integer number.
 * @param num2 The second integer number.
 * @return The final result obtained after performing the complicated operation.
 */
fun shiftAndMultiplyAssignment(num1: Int, num2: Int): Int {

    // Apply the Left Shift Operator 'num1' times on 'num2'
    var shiftedNum = num2 shl num1

    // Apply the Right Shift Operator 'num1' times on the shifted number
    var result = num1 ushr shiftedNum

    // Multiply the shifted number by the result of the previous operation using the Multiplication Assignment Operator
    result *= shiftedNum

    return result
}

// Uncomment the following lines to test the function
// println(shiftAndMultiplyAssignment(3, 2))  // Expected output: 16
// println(shiftAndMultiplyAssignment(5, 7))  // Expected output: 896
// println(shiftAndMultiplyAssignment(4, 10))  // Expected output:
/**
 * This function takes two integers, num1 and num2, and performs a complicated operation involving both
 * the Left and Right Shift Operators as well as the Multiplication Assignment Operator. It returns the final result.
 *
 * @param num1 The first integer number.
 * @param num2 The second integer number.
 * @return The final result obtained after performing the complicated operation.
 */
fun shiftAndMultiplyAssignment(num1: Int, num2: Int): Int {
/**
 * This function takes two integers, num1 and num2, and performs a complicated operation involving both
 * the Left and Right Shift Operators as well as the Multiplication Assignment Operator. It returns the final result.
 *
 * @param num1 The first integer number.
 * @param num2 The second integer number.
 * @return The final result obtained after performing the complicated operation.
 */
fun shiftAndMultiplyAssignment(num1: Int, num2: Int): Int {

    // Apply the Left Shift Operator 'num1' times on 'num2'
    var shiftedNum = num2 shl num1

    // Apply the Right Shift Operator 'num1' times on the shifted number
    var result = num1 ushr shiftedNum

    // Multiply the shifted number by the result of the previous operation using the Multiplication Assignment Operator
    result *= shiftedNum

    return result
}

// Uncomment the following lines to test the function
// println(shiftAndMultiplyAssignment(3, 2))  // Expected output: 16
// println(shiftAndMultiplyAssignment(5, 7))  // Expected output: 896
// println(shiftAndMultiplyAssignment(4, 10))  // Expected output: