using System;
public class Program
{
public static void Main()
int x = 34, y = 5;
// Code to swap 'x' and 'y'
x = x + y; // x now becomes 15
y = x - y; // y becomes 10
x = x - y; // x becomes 5
Console.WriteLine("x:{0}",x);
Console.WriteLine("y:{0}",y);
x = x ^ y; // x now becomes 15 (1111)
y = x ^ y; // y becomes 10 (1010)
x = x ^ y; // x becomes 5 (0101)
Console.WriteLine("using bitwise Xor operations");
}