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
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
Math,
4 months ago
Math,
4 months ago
Social Sciences,
8 months ago
English,
8 months ago
Science,
1 year ago