python program to swap number without Using a temporary variable | swap number without using temporary variable in python |


python program to swap number without Using a temporary variable | swap number without using temporary variable in python |

python program to swap number without Using a temporary variable 




python program to swap number without Using a temporary variable | swap number without using temporary variable in python |
Swap Number Without Using Temporary Variable 




Program - 

a=int(input("Enter First number:"))
b=int(input("Enter Second number:"))
a=a+b
b=a-b
a=a-b
print("After swap a is:",a,"b is:",b)


Output-

Enter First number:4
Enter Second number:8
After swap a is: 8 b is: 4


Post a Comment

Post a Comment (0)

Previous Post Next Post