Problem 25

2 comments on “Problem 25”


  • anusha anusha

    x = 5
    y = 10

    temp = x
    x = y
    y = temp

    print(‘after swapping: {}’.format(x))
    print(‘after swapping: {}’.format(y))


  • Mohd Saif

    n1,n2=map(int,input(“Enter the value of n1 and n2:”).split(” “))
    print(f”Before swapping the value of n1 and n2:{n1},{n2}”)
    n1=n1+n2
    n2=n1-n2
    n1=n1-n2
    print(f”After swapping the value of n1 and n2:{n1},{n2}”)