Swap between 2 number with the help of third variable in Python
View All Python Programs Source Code n1=8n2=9print(“Before swap”)print(“n1=”,n1)print(“n2=”,n2)n3=n1+n2n2=n3-n2n1=n3-n2print(“After swap”)print(“n1=”,n1)print(“n2=”,n2) Output Before swapn1= 8n2= 9After swapn1= 9n2= 8 View All Python Programs
Swap between 2 number with the help of third variable in Python Read More »