Computer Science, asked by dehahuntu123, 8 months ago

program to input two nos. in two different location A and B. write the code to interchange (swap) their value. without using third variable​

Answers

Answered by pavitranayak04
1

Answer:

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

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

a,b = b,a

print("Value of a is ", a)

print("Value of b is ", b)

Explanation:

The above code is in python language. The code prints the swaped value of a and b.

.

.

.

Hope this helps.

Happy learning :)

Similar questions