How do you switch values of variables A and B without using a third variable for storage?
Anonymous
b = a + b a = b - a b = b - a If we have a = 3 and b = 5 we have: b = 3 + 5 = 8 a = b - a = 8 - 3 = 5 b = b - a = 8 - 5 = 3
Check out your Company Bowl for anonymous work chats.