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)
Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more.
Sign Up for our weekly newsletter to get update about new content.