Valient's IT Notes
Swapping two variables without using another variable (Arithmetic Operator)
a = 5 b = 10 a = a + b b = a - b a = a - b print(a, b) 10 5
I found this algorithm interesting.
Example made in Python
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment