int x = 9;
int y = 10;
Console.WriteLine(x);
Console.WriteLine(y);
1) x = x ^ y;
y = y ^ x;
x = x ^ y;
Console.WriteLine(x);
Console.WriteLine(y);
2)
x = x + y;
y = x - y;
x = x - y;
Console.WriteLine(x);
Console.WriteLine(y);
^=Xor's
int y = 10;
Console.WriteLine(x);
Console.WriteLine(y);
1) x = x ^ y;
y = y ^ x;
x = x ^ y;
Console.WriteLine(x);
Console.WriteLine(y);
2)
x = x + y;
y = x - y;
x = x - y;
Console.WriteLine(x);
Console.WriteLine(y);
^=Xor's
No comments:
Post a Comment