Computer Science, asked by iamt1757, 1 year ago

swap 2 numbers without using third variable?

Answers

Answered by vaibhavpatelclass11
0

Answer:

#program that accepts that two numbers and swaps those two numbers

a=int(input("Enter the first number:"))

b=int(input("Enter the second number:"))

print("numbers before swaping:",a,b)

a=a+b

b=a-b

a=a-b

print("numbers after swaping:",a,b)

Similar questions