Skip to content
C

Swap with XOR

Mediumjava

Read two integers a and b and swap their values using only the XOR operator (a ^= b; b ^= a; a ^= b;), then print them.

Input: two integers separated by whitespace.

Output: one line: a=<a> b=<b> after the swap.

Input (stdin)

Output

Run your code to see output here...