Swap two variables without using a third variable.
Anonymous
class Program { static void Main(string[] args) { int first,second ; first = 1; second = 2; first = first + second; second = first - second; first = first - second; Console.WriteLine(first.ToString()); Console.WriteLine(second.ToString()); Console.ReadLine(); } } }
Check out your Company Bowl for anonymous work chats.