Class 9th CBSE

Write a Python code to inpt two numbers. Display the numbers after swapping them without using built-in function or a third variable.

Python Basic

Write a Python code to inpt two numbers. Display the numbers after swapping them without using built-in function or a third variable.

Sol :- 

a = int(input(“Enter the first number :- “))
b = int(input(“Enter the Second number :- “))
a = a+b
b = a-b
a = a-b
print(“After swapping a:”,a)
print(“After swapping b:”,b)

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable