Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
int array element change with xor
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] ary = {1,3,5,7,9,2,4,6,8,10}; //array[3]與array[5]交換 ary[3] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); ary[5] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); ary[3] = ary[3] ^ ary[5]; Console.WriteLine(ary[3]); } } }
run
|
edit
|
history
|
help
0
Program A
my
Melody
30272 Example2
saetr
default branch name
pass-len-to-predicate-modified
num 1
Number to string
Fusion