Python Program to Swap Two Numbers Without Using Third(Temporary) Variable
In this program we will swap two numbers without using a third varibale.
- #Swap two numbers without using third variable
-
- a=int(input("Enter first number: "))
- b=int(input("Enter second number: "))
-
- a = a + b;
- b = a - b;
- a = a - b;
-
- print("Swapping of numbers are: ", a, "and", b)
Output

Solution not working or have any suggestions? Please send an email to [email protected]
Download Android App