Program to initialize two integer variables a and b with 5 and 6 respectively and interchange them. Thus after interchanging a and b will be 6 and 5 respectively.
Answers
Answered by
1
Answer:
print("Enter first number")
number1=input()
print("Enter first number")
number2=input()
print("Value of a is "+str(number1)+" and b is "+str(number2))
temp=number1
number1=number2
number2=temp
print("After interchange")
print("Value of a is "+str(number1)+" and b is "+str(number2))
Explanation:
Similar questions