Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
swap using 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 first, second; first = 100; second = 200; //swap numbers using XOR first = second^first; second = second^first; first = first^second; Console.WriteLine("first = " + first); Console.WriteLine("second = " + second); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
a
Calculate Combinatorics (cards)
Crystals Plep
Interface constraints in generics
Rextester
Saga name NLog
Reverse And Shift Char in String
StackOverflowException
Enum Extension
Calculate Used Unit from Readings
Please log in to post a comment.