print("__________________________________________")print("Program to swap the two numbers")print("__________________________________________")a=int(input("a = "))b=int(input("b = "))a=a+bb=a-ba=a-bprint("__________________________________________")print("After swapping...")print("__________________________________________")print("a = ",a)print("b = ",b)print("__________________________________________")
Output
codeaft@codeaft:~$ python3 codeaft.py
__________________________________________
Program to swap the two numbers
__________________________________________
a = 1024
b = 2048
__________________________________________
After swapping...
__________________________________________
a = 2048
b = 1024
__________________________________________
Dear User, Thank you for visitng Codeaft. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.