Swap Two Numbers Without Temporary Variable

# Introduction In this lab, you need to create a program that swaps two numbers using addition and subtraction without the use of a temporary variable, by adding the first number to the second number, subtracting the second number from the updated first number, and then subtracting the second number from the updated first number again.

|60 : 00

Click the virtual machine below to start practicing