Computer Science, asked by 14010335, 11 hours ago

Two numbers are input through the keyboard into two locations C and D. Write a python program to interchange the contents of C and D. without using branching Statements or if Statement.

Answers

Answered by samarthkrv
0

Answer:

c = int(input("Enter value for c:"))

d = int(input("Enter the value for d:"))

print("Before swapping-")

print("c:",c,"\nd:",d)

temp = c

c = d

d = temp

print("After swapping")

print("c:",c,"\nd:",d)

Explanation:

Similar questions