Computer Science, asked by lakshmicollection311, 1 day ago

Write a python program to swap two numbers using three variables.

please help​

Answers

Answered by singhreema2345
0

Answer:

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

c = int(input("Enter third number: "))

print("The three number are", a, b, c)

a, b = a + b, b + c

print("Numbers after swapping are", a, b, c)

Answered by daisy3615
1

Hello!

a=int(input("Enter value of a "))

b=int(input("Enter value of b "))

c=int(input("Enter value of c "))

print("Value of a before swapping",a)

print("Value of b before swapping",b)

a=b

b=c

c=a

print("Value of a after swapping",a)

print("Value of b after swapping",b)

Hope it's correct!

Similar questions